React Native Fs

screenshot of React Native Fs
react-native

Native filesystem access for react-native

Overview

The react-native-fs is a library that provides native filesystem access for React Native applications. It offers support for iOS, Android, and Windows platforms, enabling functionalities like file creation, deletion, upload, and access to various directories.

Features

  • iOS Support: Provides access to various iOS filesystem directories.
  • Android Support: Limited to the DocumentDirectory on Android.
  • Windows Support: Enables filesystem access for Windows platforms.
  • Automatic Installation: Features react-native link for easy setup.
  • Manual Installation: Includes detailed steps for manual setup in XCode and Visual Studio.
  • API Constants: Offers access to important filesystem paths through constants.

iOS/macOS

  1. Install react-native-fs using:
    npm install react-native-fs
    
  2. Link the library automatically with:
    react-native link react-native-fs
    
  3. Alternatively, manually add the library in XCode by following specific steps.

Android

  1. Make necessary file alterations to settings.gradle, build.gradle, and MainActivity.java.
  2. For different versions of React Native, follow the specific instructions provided.

Windows

  1. Automatically add the native dependency with:
    react-native link react-native-fs
    
  2. For manual setup in Visual Studio, refer to the 'Linking Libraries' documentation on the react-native-windows GitHub repository.

Summary

The react-native-fs library is a valuable tool for React Native developers needing native filesystem access across iOS, Android, and Windows platforms. With support for automatic and manual installation, developers can easily integrate features like file creation, deletion, and upload into their applications. The provided API constants offer convenient access to critical filesystem paths, enhancing the usability and functionality of React Native applications.

react-native
React Native

React Native is a framework for building mobile applications using React and JavaScript. It enables developers to write once and deploy to multiple platforms, including iOS, Android, and the web, while providing a native app-like experience to users.