Hi!
> While storageName looks like a directory component, it isn't, it's the name
> of a volume. Typical volume names might be sdcard and extsdcard, so a fully
> qualified name would look like:
>
> /sdcard/directory/file
> /extsdcard/directory/file
Do we have standards regarding the directory part? I noticed that there
is a 'Download' directory on my unagi's sdcard, but Bluetooth currently
stores transfered files in 'download/bluetooth'.
Best regards
Thomas
>
> navigator.getDeviceStorage(type) now returns what I call a composite device
> storage object.
>
> navigator.getDeviceStorages(type) returns an array of non-composite storage
> objects. It is anticipated that this particular API would only be used by the
> settings app for displaying free/used space for each volume. Each
> non-composite device storage object has an attribute called storageName which
> identifies the volume that the device storage area corresponds to.
>
> When using the composite device storage object, If you call AddNamed and were
> to specify "DCIM/foo.jpg" then it will use the default storage area (set by
> the user in the settings app under Media Storage).
>
> The onsuccess method will be passed the fully qualified name of the object
> (i.e. you'd probably get back something like /sdcard/DCIM/foo.jpg).
>
> Enumerate has changed slightly as well. Previously if you called
> enumerate('DCIM') you'd get back just the portion of the filename below the
> DCIM directory (so just foo.jpg). Now, you always get back a fully qualified
> location (/sdcard/DCIM/foo.jpg). When you use enumerate on the composite
> device storage object, it will return all of the files on all of the storage
> areas.
>
> Calling freeSpace or usedSpace on the composite object will return a sum of
> the free or used space over all of the volumes. Calling available on the
> composite object will return a composite availability.
>
> So if any volume is available, you'll get back "available". If no volumes are
> available, and any are shared, then then you'll get back "shared", otherwise
> you'll get back "unavailable".
>
> If you call available on a non-composite object it will return the
> availability for that particular storage area.
>
> I'm sure I've broken some stuff, but the basics seem to work, i.e. I can take
> a picture, and see it in gallery, and I can see music etc. I'll be working
> next week to more exhaustively test all of the areas which I may have
> otherwise missed.
>
> Dave Hylands
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g