breautek commented on issue #287:
URL: 
https://github.com/apache/cordova-plugin-file/issues/287#issuecomment-788870579


   This isn't a bug.
   
   > await window.requestFileSystem
   
   Using `requestFileSystem` in `PERSISTENT` mode on iOS is mapped 
`Library/files`. This is an implementation detail and thus isn't documented. I 
do not know the historical reason why this was chosen, but changing this would 
be a breaking change and I don't believe that is necessary. My best guess is 
Cordova was trying to implement the File API according to the W3C spec, and 
needed to use a storage folder that was unlikely to conflict with the other 
constants.
   
   If you want the documents directory, then use 
`window.resolveLocalFileSystemURL(cordova.file.documentsDirectory, 
successCallback, errorCallback)` instead.
   
   > Can someone please advise the correct directory we should be 
storing/referencing for private non-sharable files?
   
   Everything inside the application directory (e.g: 
`file:///var/mobile/Containers/Data/Application/<GUID>/` is private to the app. 
All non-external constants in `cordova.file` is also private to the app.
   
   In fact, there is no publicly accessible directories on iOS. That concept 
doesn't exists unlike other platforms, which is why all the `external*` 
constants are null on iOS. Sharing files like audio or images can only be done 
via other APIs not related to the filesystem.
   
   More information on this is documented at 
https://github.com/apache/cordova-plugin-file#ios-file-system-layout


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to