If your application is sandboxed, you won’t have access to much of the file system. If you unsandbox your application (by adding a line “
sandboxed: false” to your
.adef file), then you’ll have access to all of the file system. It doesn’t matter whether you use
open(). They should both work.
Of course, it’s better to run sandboxed. There are some features in the
.adef files that allow you to remain sandboxed but still have access to certain files in the root file system (see
requires:). Sometimes that can not work as expected, though, because the file must exist when your app starts, and some files, like
/etc/resolv.conf may get created later, or deleted and re-created as things happen at run time.
Another option is to build a small, simple, unsandboxed app that does the file system access and exports an application specific API for use by your main application code, which remains sandboxed.
I hope this helps.