react-native-fs: Native filesystem access for React Native
Cross-platform native filesystem operations for React Native applications.
Learn more about React Native FS
react-native-fs is a React Native module that bridges JavaScript code to native filesystem APIs on multiple platforms. It uses native code implementations for iOS (Objective-C), Android (Java), and Windows to access the underlying operating system's file system capabilities. The library maps platform-specific directory structures and file operations to a unified JavaScript API. Common use cases include downloading files, reading configuration data, caching application content, and managing local file storage within React Native applications.
Multi-platform support
Provides native filesystem access across iOS, Android, and Windows platforms through a single JavaScript API, with platform-specific implementations handling differences in directory structures and permissions.
Version compatibility requirements
Maintains specific version branches aligned with React Native and Gradle versions, requiring different installation versions for RN < 0.57, RN 0.57-0.60, and RN >= 0.61 to ensure compatibility with build system changes.
Platform-specific directory access
On Android, access is limited to the app's DocumentDirectory (files directory), while iOS and other platforms support broader filesystem access patterns through native bridging.
import RNFS from 'react-native-fs';
const readConfigFile = async () => {
const path = `${RNFS.DocumentDirectoryPath}/config.txt`;
const content = await RNFS.readFile(path, 'utf8');
console.log('File content:', content);
return content;
};Top in Mobile & Desktop
Related Repositories
Discover similar tools and frameworks used by developers
SnapKit
Swift DSL for type-safe programmatic Auto Layout constraints.
Microsoft PowerToys
A suite of 25+ Windows utilities for window management, file operations, and productivity enhancements.
Magisk
Android root solution with systemless modifications and boot image management for Android 6.0+.
HandBrake
Cross-platform video transcoder that converts video files into formats compatible with various devices and platforms.
React Native Vector Icons
Vector icon fonts rendered as native React Native components.