Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

expo-file-system

expo3.2mMIT18.0.7TypeScript support: included

Provides access to the local file system on the device.

react-native, expo, file-system, file

readme

expo sdk

Expo

Expo SDK version Chat or ask a question License: MIT Downloads

Try Expo in the Browser  •  Read the Documentation  •  Learn more on our blog  •  Request a feature

Follow us on

Expo on X   Expo on GitHub   Expo on Reddit   Expo on LinkedIn   Expo on LinkedIn

Introduction

Expo is an open-source platform for making universal native apps that run on Android, iOS, and the web. It includes a universal runtime and libraries that let you build native apps by writing React and JavaScript.

This repository includes the Expo SDK, Modules API, Go app, CLI, Router, documentation, and various other supporting tools. Expo Application Services (EAS) is a platform of hosted services that are deeply integrated with Expo open source tools. EAS helps you build, ship, and iterate on your app as an individual or a team.

Read the Expo Community Guidelines before interacting in the repository. Thank you for helping keep the Expo community open and welcoming!

Table of contents

📚 Documentation

Learn about building and deploying universal apps in our official docs!

🗺 Project Layout

  • packages All the source code for Expo modules, if you want to edit a library or just see how it works this is where you'll find it.
  • apps This is where you can find Expo projects which are linked to the development modules. You'll do most of your testing in here.
  • apps/expo-go This is where you can find the source code for Expo Go.
  • apps/expo-go/ios/Exponent.xcworkspace is the Xcode workspace. When developing iOS, always open this instead of Exponent.xcodeproj because the workspace also loads the CocoaPods dependencies.
  • docs The source code for https://docs.expo.dev
  • templates The template projects you get when you run npx create-expo-app
  • react-native-lab This is our fork of react-native used to build Expo Go.
  • guides In-depth tutorials for advanced topics like contributing to the client.
  • tools contain build and configuration tools.
  • template-files contains templates for files that require private keys. They are populated using the keys in template-files/keys.json.
  • template-files/ios/dependencies.json specifies the CocoaPods dependencies of the app.

🏅 Badges

Let everyone know your app can be run instantly in the Expo Go app!

runs with Expo Go

runs with Expo Go

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-000.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-4630EB.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

👏 Contributing

If you like Expo and want to help make it better then check out our contributing guide! Check out the CLI package to work on the Expo CLI.

❓ FAQ

If you have questions about Expo and want answers, then check out our Frequently Asked Questions!

If you still have questions you can ask them on our Discord and Forums or X @expo.

💙 The Team

Curious about who makes Expo? Here are our team members!

License

The Expo source code is made available under the MIT license. Some of the dependencies are licensed differently, with the BSD license, for example.

Star the Expo repo on GitHub to support the project

changelog

Changelog

Unpublished

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

💡 Others

18.0.7 — 2025-01-10

This version does not introduce any user-facing changes.

18.0.6 — 2024-12-16

🎉 New features

18.0.5 — 2024-12-10

🐛 Bug fixes

18.0.4 — 2024-11-19

🎉 New features

  • [next] Added .bytes() and writing a Uint8Array. (#33020 by @aleqsio)

18.0.3 — 2024-11-13

🎉 New features

18.0.2 — 2024-11-11

This version does not introduce any user-facing changes.

18.0.1 — 2024-11-07

🐛 Bug fixes

  • [expo-file-system][next] Fix download function throwing an unexpected error if destination already exists. (#32626 by @aleqsio)

18.0.0 — 2024-10-22

🛠 Breaking changes

🎉 New features

  • [expo-file-system][next] Add file permissions for expo go (#31594 by @aleqsio)
  • [expo-file-system][next] Add better error handling to delete (#31683 by @aleqsio)
  • [expo-file-system][next] Adjust copy/move functions to allow renaming folders. (#31636 by @aleqsio)
  • [expo-file-system][next] Add name property to files and directories. (#31545 by @aleqsio)
  • Add path joining in File and Directory constructors. (#31467 by @aleqsio)
  • [expo-file-system][next] Make move operation change file url. (#31544 by @aleqsio)
  • Change exists() function to a property. (#31522 by @aleqsio)
  • Add path utilities and parentDirectory, extension fields to the new file system module. (#31333 by @aleqsio)
  • Add listing directory contents to the new file system module. (#31121 by @aleqsio)
  • Add base64() new file system module. (#31357 by @aleqsio)
  • Add size and md5 properties to the new file system module. (#31301 by @aleqsio)
  • Add downloading to the new file system module. (#30841 by @aleqsio)
  • Add copying and moving files to the new file system module. (#30314 by @aleqsio)
  • Add new file system module. (#29995 by @aleqsio)
  • [iOS] Added Paths.appleSharedContainers to get the paths to the Apple App Groups shared containers. (#31525 by @IgorKhramtsov and @kudo)

🐛 Bug fixes

  • [iOS] fix: getFreeDiskStorageAsync returns result that's closer to the value reported by the system. (#29732 by @vonovak)
  • Add NULL check before dereferencing pointer to error pointer in EXFileSystemAssetLibraryHandler. (#29091 by @hakonk)
  • Add missing react-native peer dependencies for isolated modules. (#30466 by @byCedric)

💡 Others

  • [iOS] Validate folder/file type when operating on File/Folder instances in the new FS module. (#31316 by @aleqsio)
  • Use the src folder as the Metro target. (#31234 by @aleqsio)
  • Removed redundant usage of EventEmitter instance. (#28946 by @tsapeta)

17.0.1 — 2024-04-23

This version does not introduce any user-facing changes.

17.0.0 — 2024-04-18

🐛 Bug fixes

  • [Android] remove CookieHandler as it's no longer in the module registry and not necessary. (#28145 by @alanjhughes)

💡 Others

  • [iOS] Add privacy manifest describing required reason API usage. (#27770 by @aleqsio)
  • drop unused web name property. (#27437 by @EvanBacon)
  • Removed deprecated backward compatible Gradle settings. (#28083 by @kudo)

16.0.8 - 2024-03-07

This version does not introduce any user-facing changes.

16.0.7 - 2024-02-27

🐛 Bug fixes

16.0.6 - 2024-02-06

🐛 Bug fixes

16.0.5 - 2024-01-23

🐛 Bug fixes

16.0.4 - 2024-01-18

This version does not introduce any user-facing changes.

16.0.3 - 2024-01-10

🎉 New features

16.0.2 - 2023-12-19

This version does not introduce any user-facing changes.

16.0.1 — 2023-12-13

This version does not introduce any user-facing changes.

16.0.0 — 2023-12-12

🐛 Bug fixes

  • On Android, handle using files from SAF correctly. (#25389 by @alanjhughes)
  • Removed legacy bundledAssets constant that was used only in standalone apps. (#25484 by @tsapeta)
  • [iOS] Added missing check for directory permissions in deleteAsync method. (#25704 by @tsapeta)

15.4.5 — 2023-11-20

🐛 Bug fixes

  • On Android, use addInterceptor instead of addNetworkInterceptor in downloadResumableStartAsync. (#24702 by @alanhughes)

15.9.0 — 2023-11-14

🛠 Breaking changes

15.8.0 — 2023-10-17

🛠 Breaking changes

🐛 Bug fixes

  • On Android, use addInterceptor instead of addNetworkInterceptor in downloadResumableStartAsync. (#24702 by @alanhughes)

15.7.0 — 2023-09-15

🎉 New features

💡 Others

  • Migrated to Swift and Expo Modules API on iOS. (#23943 by @tsapeta)
  • Throw the correct error when we can't find the permissions modules. (#24464 by @alanhughes)

15.6.0 — 2023-09-04

🎉 New features

  • Added support for React Native 0.73. (#24018 by @kudo)

15.4.4 - 2023-08-29

This version does not introduce any user-facing changes.

15.4.3 - 2023-08-09

🐛 Bug fixes

15.5.1 — 2023-08-02

This version does not introduce any user-facing changes.

15.5.0 — 2023-07-28

💡 Others

15.4.2 — 2023-06-28

This version does not introduce any user-facing changes.

15.4.1 — 2023-06-27

🐛 Bug fixes

  • Fixed hard crash on iOS when calling readDirectoryAsync. (#23106 by @aleqsio)

15.4.0 — 2023-06-13

🎉 New features

🐛 Bug fixes

15.3.0 — 2023-05-08

🛠 Breaking changes

🐛 Bug fixes

💡 Others

  • Android: Switch from deprecated toLowerCase to lowercase function (#22225 by @hbiede)

15.2.2 — 2023-02-09

This version does not introduce any user-facing changes.

15.2.1 — 2023-02-09

🐛 Bug fixes

15.2.0 — 2023-02-03

💡 Others

  • Extract nested object definitions to the separate types, which adds: DeletingOptions, InfoOptions, RelocatingOptions and MakeDirectoryOptions types. (#20103 by @Simek)
  • Simplify the way in which types are exported from the package. (#20103 by @Simek)
  • Rename UploadProgressData totalByteSent field to totalBytesSent. (#20804 by @gabrieldonadel)
  • On Android bump compileSdkVersion and targetSdkVersion to 33. (#20721 by @lukmccall)

15.1.1 — 2022-10-28

This version does not introduce any user-facing changes.

15.1.0 — 2022-10-25

🎉 New features

  • Added DirectoriesModule to expo-file-system on Android as a temporary solution to fix cache directories being incorrect in new Sweet API modules. (#19205 by @aleqsio)

15.0.0 — 2022-10-06

🛠 Breaking changes

  • Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. (#18873 by @tsapeta)

💡 Others

  • [plugin] Migrate import from @expo/config-plugins to expo/config-plugins and @expo/config-types to expo/config. (#18855 by @brentvatne)
  • Drop @expo/config-plugins dependency in favor of peer dependency on expo. (#18595 by @EvanBacon)

14.1.0 — 2022-07-07

This version does not introduce any user-facing changes.

14.0.0 — 2022-04-18

🛠 Breaking changes

  • Remove okhttp and okio backward compatible workaround and drop react-native 0.64 support. (#16446 by @kudo)

🐛 Bug fixes

  • Fixed failing download on Android when using createDownloadResumable(), because of an invalid Range header. (#15934 by @johanpoirier)
  • Fix Plugin with id 'maven' not found build error from Android Gradle 7. (#16080 by @kudo)
  • Fix URL scheme differences between iOS and Android. (#16352 by @hbiede)

⚠️ Notices

  • On Android bump compileSdkVersion to 31, targetSdkVersion to 31 and Java version to 11. (#16941 by @bbarthec)

13.2.1 — 2022-01-20

🐛 Bug fixes

  • Fix build errors on React Native 0.66 caused by okio and okhttp. (#15632 by @kudo)

13.2.0 — 2021-12-22

🐛 Bug fixes

  • Fixed runtime crash due to .toUpperCase not being invoked as a function, it was missing (). (#15615 by @lukebrandonfarrell)
  • Fixed totalByteSent in upload progress callback incorrectly sending bytesSent on iOS. (#15615 by @lukebrandonfarrell)
  • Fixed simulator runtime crash on arm64 devices caused by CFRelease(NULL). (#15496 by @daxaxelrod)

💡 Others

13.1.4 — 2022-02-10

This version does not introduce any user-facing changes.

13.1.3 — 2022-02-01

🐛 Bug fixes

  • Fix Plugin with id 'maven' not found build error from Android Gradle 7. (#16080 by @kudo)

13.1.2 — 2022-01-22

🐛 Bug fixes

  • Fixed runtime crash due to .toUpperCase not being invoked as a function, it was missing (). (#15615 by @lukebrandonfarrell)
  • Fixed totalByteSent in upload progress callback incorrectly sending bytesSent on iOS. (#15615 by @lukebrandonfarrell)
  • Fixed simulator runtime crash on arm64 devices caused by CFRelease(NULL). (#15496 by @daxaxelrod)

13.1.1 — 2022-01-20

🐛 Bug fixes

  • Fix build errors on React Native 0.66 caused by okio and okhttp. (#15632 by @kudo)

13.1.0 — 2021-11-17

🐛 Bug fixes

13.0.1 — 2021-10-01

This version does not introduce any user-facing changes.

13.0.0 — 2021-09-28

🛠 Breaking changes

🐛 Bug fixes

  • getFreeDiskStorageAsync now correctly reports free disk space on iOS. (#14279 by mickmaccallum)
  • Fix building errors from use_frameworks! in Podfile. (#14523 by @kudo)

💡 Others

12.0.0 — 2021-09-08

🛠 Breaking changes

💡 Others

  • Migrated from @unimodules/core to expo-modules-core. (#13749 by @tsapeta)

11.1.0 — 2021-06-16

🐛 Bug fixes

💡 Others

  • Migrated from unimodules-file-system-interface to expo-modules-core.
  • Build Android code using Java 8 to fix Android instrumented test build error. (#12939 by @kudo)
  • Refactored uuid imports to v7 style. (#13037 by @giautm)

11.0.2 — 2021-04-13

This version does not introduce any user-facing changes.

11.0.1 — 2021-04-09

This version does not introduce any user-facing changes.

11.0.0 — 2021-03-10

🎉 New features

  • Converted plugin to TypeScript. (#11715 by @EvanBacon)
  • Updated Android build configuration to target Android 11 (added support for Android SDK 30). (#11647 by @bbarthec)
  • Added support for Storage Access Framework (Android only). (#12032 by @lukmccall)

🐛 Bug fixes

  • Fixed copying movies from assets not working on iOS. (#11749 by @lukmccall)
  • Remove peerDependencies and unimodulePeerDependencies from Expo modules. (#11980 by @brentvatne)

10.0.0 — 2021-01-15

⚠️ Notices

🛠 Breaking changes

🎉 New features

9.3.0 — 2020-11-17

This version does not introduce any user-facing changes.

9.2.0 — 2020-08-18

🐛 Bug fixes

  • Added docs about Android permissions and removed old storage permission. (#9447 by @bycedric)

9.1.0 — 2020-07-27

🐛 Bug fixes

  • Fix background URL session completion handler not being called. (#8599 by @lukmccall)
  • Fix compilation error on macOS Catalyst (#9055 by @andymatuschak)
  • Fixed uploadAsync native signature on Android. (#9076 by @lukmccall)
  • Fixed uploadAsync throwing Double cannot be cast to Integer on Android. (#9076 by @lukmccall)
  • Fixed getInfo returning incorrect size when provided path points to a folder. (#9063 by @lukmccall)
  • Fixed uploadAsync() returning empty response on iOS. (#9166 by @barthap)

9.0.1 — 2020-05-29

This version does not introduce any user-facing changes.

9.0.0 — 2020-05-27

🛠 Breaking changes

  • FileSystem.downloadAsync and FileSystem.DownloadResumable work by default when the app is in background too — they won't reject when the application is backgrounded. (#7380 by @lukmccall)
  • FileSystem.downloadAsync and FileSystem.DownloadResumable will reject when invalid headers dictionary is provided. These methods accept only Record<string, string>. (#7380 by @lukmccall)
  • FileSystem.getContentUriAsync now returns a string. (#7192 by @lukmccall)

🎉 New features

  • Add FileSystem.uploadAsync method. (#7380 by @lukmccall)
  • Add ability to read Android raw and drawable resources in FileSystem.getInfoAsync, FileSystem.readAsStringAsync, and FileSystem.copyAsync. (#8104 by @esamelson)