This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 51).
A library that provides access to the local file system on the device.
expo-file-system
provides access to a file system stored locally on the device.
-
npx expo install expo-file-system
If you are installing this in an existing React Native app (bare workflow), start by installing expo
in your project. Then, follow the additional instructions as mentioned by library's README under "Installation in bare React Native projects" section.
Directory
Type: Class extends FileSystemDirectory
Directory Properties
Directory Methods
exists()
Checks if a directory exists.
boolean
true
if the directory exists, false
otherwise.
File
Type: Class extends FileSystemFile
File Properties
File Methods
exists()
Checks if a file exists.
boolean
true
if the file exists, false
otherwise.
write(content)
Name | Type | Description |
---|---|---|
content | string | The content to write into the file. |
Writes content to the file.
void
FileSystem Next.write(file, contents)
Name | Type |
---|---|
file | File |
contents | string |
Promise<void>