profile
viewpoint

Ask questionsgetting full file system access

I understand the idea of sandboxing file system access, but I'm working on a project where I fully trust the script I'm running inside LiquidCore and the virtual file system makes things quite difficult for me, i.e. I need to constantly map between paths of the environment and my script.

I would highly welcome an option to allow full access to the hosts file system. If there already is such an option, I'm afraid I haven't found it.

LiquidPlayer/LiquidCore

Answer questions ericwlange

Hi @Znerole - I have added this functionality which will get pushed with the next release.

Android Example

  android.content.Context context = ...;
  MicroService service = ...;

  final String dir = context.getFilesDir().getAbsolutePath();
  service.getProcess().exposeHostDirectory(dir, Process.kMediaAccessPermissionsRW);

Assuming dir is something like /data/data/0/org.foo.bar/blahblah, this directory will now be available to the micro service:

  const fs = require('fs')
  let content = String(fs.readFileSync('/data/data/0/org.foo.bar/blahblah/SomeFile.txt'))

iOS Example

  service.process.exposeHostDirectory(NSHomeDirectory(), mediaAccessMask:PermissionsRW)
useful!

Related questions

No questions were found.
Github User Rank List