Giter Site home page Giter Site logo

Comments (6)

alpha0010 avatar alpha0010 commented on June 8, 2024 1

@SaeedZhiany Sorry, I tend to miss comments on closed issues.

By default, this library uses internal storage. Prefix your path with one of the Dirs.* constants (with the exception of Dirs.SDCardDir).

To send data to external storage, you can use FileSystem.cpExternal() and to get from external storage use a content:// uri (as produced by, for example, react-native-document-picker) as the source parameter for a read call (e.g. FileSystem.cp()). Note that this gives you only limited control over how to interact with external storage, but that is necessary by Android security design. If you want to write anywhere you need the MANAGE_EXTERNAL_STORAGE permission, which will allow you to construct absolute paths yourself without needing to use a Dirs.* constant (/path/to/any/file.txt).

from react-native-file-access.

Onibenjo avatar Onibenjo commented on June 8, 2024

Ok, it is not a bug. Please any workaround around this?

from react-native-file-access.

alpha0010 avatar alpha0010 commented on June 8, 2024

Dirs constant does not currently have paths (though internal code technically has no restrictions against access). Android is moving toward requiring MediaStore api for apps interacting with shared phone storage and I am uncertain how best to implement (without diverging too far from iOS if possible, ideally avoiding need for Platform.OS checks for apps using this library).

from react-native-file-access.

alpha0010 avatar alpha0010 commented on June 8, 2024

Fixed in v0.6.0.

from react-native-file-access.

Onibenjo avatar Onibenjo commented on June 8, 2024

Oh OK thanks

from react-native-file-access.

SaeedZhiany avatar SaeedZhiany commented on June 8, 2024

@alpha0010

I didn't figure it out correctly, is it possible to work with Internal Storage in android by using your library? I need to store my files in the internal Storage so unroot devices will not be able to access my files.

does your library support both internal and external Storage utilities in Android?

if it's possible, which functions give me that utility?

Thanks

from react-native-file-access.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.