alpha0010 / react-native-file-access

Filesystem access for React Native
MIT License
307 stars 19 forks source link

Question: How do we read external storage #29

Closed FrederickEngelhardt closed 3 years ago

FrederickEngelhardt commented 3 years ago

I'm not seeing a read external storage directory command. Does one exist?

Thanks!

Update:

Upon playing around with the paths it looks like /storage/ is the root folder that contains the externalSD and internal sd.

alpha0010 commented 3 years ago

Dirs.SDCardDir should also give you that folder (though constant may be null if code is not certain). Be aware that targeting latest Android API will require broad permission MANAGE_EXTERNAL_STORAGE to read/write directly there.

Alternatively if you get a content uri (e.g. from react-native-image-picker), it should work as a path parameter to other API calls in this library (without requiring special permissions).

alpha0010 commented 3 years ago

Assuming resolved.