I mean this specifically for local preview (macOS), it seems the file is saving but I can’t find it anywhere. Where does all of this stuff go?
When using relative paths the
FileSystem module just saves the file to the current working directory of the process.
The current working directory will differ depending on platform and from where
fuse preview was invoked. The FileSystem module does not currently provide a way to change that path, although we might add support for that in the future.
To get more predictable behavior you should instead build an absolute path using
FileSystem.dataDirectory as a base directory, or use one of the other paths provided by the FileSystem module:
var path = FileSystem.dataDirectory + "/" + "myfile.txt";
Right now, in Fuse 0.31.0, the
FileSystem.dataDirectory maps to
build/Local/Preview/Data when using local preview on OS X.
However, you should be aware that this will change from
build/Local/Preview/fs_data in one of the next releases.
Thanks for the quick response, my worry is how this differs from previously using
Storage.write, I used only the filename as path, will pushing an update mean my users can’t access their old data? Can I expect consistency with FileSystem.dataDirectory for the future?