Remarks
Apps operate in a sandboxed environment with a restricted view of the device file system. Vega makes the following app-specific directories available in the sandbox.Get started
Setup
- Add the following library dependency to the
dependenciessection of your package.json file.
- Regenerate the
package-lock.jsonfile using thenpm installcommand.
Usage
The following examples use async/await to handle Promises returned by FileSystem methods. This pattern provides a cleaner way to work with asynchronous operations.Open a file
This example uses async/await to handle the Promise returned byFileSystem.openFile().
Remove a file
This example uses async/await to handle the Promise returned byFileSystem.removeFile().
Remove a directory
This example uses async/await to handle the Promise returned byFileSystem.removeDir().
Remove a directory recursively
This example uses async/await to handle the Promise returned byFileSystem.removeDirAll().
Read a file as a string
This example uses async/await to handle the Promise returned byFileSystem.readFileAsString().
Write a string to a file
This example uses async/await to handle the Promise returned byFileSystem.writeStringToFile().
Access file metadata
This example uses async/await to handle the Promise returned byFileSystem.getMetadata().
Access directory entries
This example uses async/await to handle the Promise returned byFileSystem.getEntries().
Modules
- index
- turbo-modules/KeplerFileSystemTM
- turbo-modules/KeplerFileSystemTM
- types
- types
- types/FileSystemTypes
- types/FileSystemTypes

