Open nukulb opened 12 years ago
Issue is the concept of sandboxed / unsandboxed.
The filesystem should have a standard root and folders to places of interest developers would want / expect to go:
Inspiration from Tizen and WAC could be used (virtual FileSystems) http://specs.wacapps.net/filesystem/index.html#virtual-file-system
Where folders are added to the root of the fileSystem (which should be the applications home in persistent, empty temp folder if temporary)
such as:
SDCard Videos Pictures Downloads ... etc
shared folder is already symlinked and we can provide paths for sd cards etc.. using just APIs in the mean time.
Two options as I see them-
Could we just symlink into sandboxed folder?
Then get rid of the concept of unsandboxing?
there are two sandbox folders temporary or persistent You can go their parent but thats not exactly less weird. You need to go the home of the app so that you can use the sym links.
I am thinking:
persistent
- SDCard
- music
- ...
temporary
- (nothing cause we probably don't want to clean up "temp" files written to music)
cc @dansilivestru
Out of curiosity,
If I create a filesystem unsandboxed using the temporary flag and write a file to the sdcard.
when is it cleaned up? Since it was temporary? Sent on the TELUS Mobility network with BlackBerry
in an unsandboxed environment temporary or persistent is ignored Everything is persistent except when you write in temporary folders on disk more awkwardness
@gtanner - how do you feel about a sandbox:// protocol
that will take you to the sanbox directly where you have simlinks to shared folder
sandbox://shared will lead to
music
pictures
...
I like @gtanner 's idea in #284 about adding it to the requestFileSystem method. Perhaps as one of the constants.
@jeffheifetz the two issues have nothing to do with each other. What are you talking about?
I like the idea of adding new constants to be used by the requestFileSystem method, such that the fileSystem object returned will either be sandboxed or not. It was simply brought up in issue #284
well I think I have different idea now.
when unsandbox the file system currently it throws you to root, I am trying to get configured so that we throw the user the app sandbox which is symlinks for everything anyways.
like tristate webview api that allows all three states
Guys, why you stop to talk about this issue? I wish to know how is the better way to getFile ... today i have this problem https://github.com/blackberry/BB10-WebWorks-Framework/issues/554#issuecomment-14091437
so I raised this long time ago but we didn't do anything about it. :(
so @gtanner raised as he was doing the Cordova port and it continues to be a weird api
I don't have a solution yet, this is more a place to brainstorm.