Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Which api is required for a file browser?

121 views
Skip to first unread message

abhasbhat...@gmail.com

unread,
Mar 20, 2013, 9:46:47 AM3/20/13
to
Hi, I am new to firefox os app development. I want to make a simple file browser for firefox os for a local hackathon. The thing is I couldnt find the proper api which would allow me to read all the local files. Is it the filereader api or the file api? For both the abovementioned api, I couldnt find out how to actually get the reference of the file without the user actually choosing a file.

Gabriele Svelto

unread,
Mar 20, 2013, 11:11:04 AM3/20/13
to abhasbhat...@gmail.com, dev...@lists.mozilla.org
On 20/03/2013 14:46, abhasbhat...@gmail.com wrote:
> Hi, I am new to firefox os app development. I want to make a simple file browser for firefox os for a local hackathon. The thing is I couldnt find the proper api which would allow me to read all the local files. Is it the filereader api or the file api? For both the abovementioned api, I couldnt find out how to actually get the reference of the file without the user actually choosing a file.

You might want to look at the device storage API:

https://developer.mozilla.org/en-US/docs/WebAPI/Device_Storage_API

Gabriele

Abhas Bhattacharya

unread,
Mar 20, 2013, 11:36:37 PM3/20/13
to abhasbhat...@gmail.com, dev...@lists.mozilla.org
> You might want to look at the device storage API:
>
>
>
> https://developer.mozilla.org/en-US/docs/WebAPI/Device_Storage_API
>
>
>
> Gabriele


Thanks, but can you tell me how to get also the list of sub-directories in a directory.
I found out this function:
"deviceStorage.enumerate([directory])
Returns a DeviceStorageCursor that enumerates Files in the storage or the directory (string) passed as argument"

Does it return only the files within the directory or also the sub-directories within it?

Also regarding the function: does the term storage mean the root directory of all the files?

Jonas Sicking

unread,
Mar 22, 2013, 11:41:21 PM3/22/13
to Abhas Bhattacharya, dev...@lists.mozilla.org
It will also enumerate subdirectories.

/ Jonas
On Mar 20, 2013 8:40 PM, "Abhas Bhattacharya" <abhasbhat...@gmail.com>
wrote:
> _______________________________________________
> dev-b2g mailing list
> dev...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-b2g
>

Abhas Bhattacharya

unread,
Mar 20, 2013, 11:36:37 PM3/20/13
to mozilla...@googlegroups.com, abhasbhat...@gmail.com, dev...@lists.mozilla.org
> You might want to look at the device storage API:
>
>
>
> https://developer.mozilla.org/en-US/docs/WebAPI/Device_Storage_API
>
>
>
> Gabriele


0 new messages