0

As far as i see the file-system.knownFolders only supports the

  • Application
  • Data
  • Temp

folders on the device storage. Is there any way how to access external storage like SD-Cards?

Nicky
  • 21
  • 4

1 Answers1

0

I have made a little research and found that you could access some directories on the device storage using android.os.Environment.getExternalStoragePublicDirectory(...).toString(). This method will return the path to wanted folder and then you could use NativeScript method to read and write files in this folder. For accessing SD Card should be something similar. In regard to that you could also review my sample project where I am accessing Download folder of the device and console.log names of all files.

You could also review below attached links:

  1. https://docs.nativescript.org/cookbook/file-system

  2. Write a file in external storage in Android

  3. https://developer.android.com/guide/topics/data/data-storage.html

Community
  • 1
  • 1
Nikolay Tsonev
  • 1,919
  • 3
  • 16
  • 29