<br><br><div class="gmail_quote">2009/8/27 Jonas Sicking <span dir="ltr"><jonas@sicking.cc></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">2009/8/27 Ian Fette ($B%$%"%s%U%'%C%F%#(B) <<a href="mailto:ifette@google.com">ifette@google.com</a>>:<br>
<div class="im">> I would much rather have a well thought-out local filesystem proposal, than<br>
> continued creep of the existing File and Local Storage proposal. These<br>
> proposals are both designed from the perspective of "I want to take some<br>
> existing data and either put it into the cloud or make it available<br>
> offline". They don't really handle the use case of "I want to create new<br>
> data and save it to the local filesystem", or "I want to modify existing<br>
> data on the filesystem", or "I want to maintain a virtual filesystem for my<br>
> application, and potentially map in the existing filesystem" (e.g. if I'm<br>
> flickr and I want to be able to read the user's "My Photos" folder, send<br>
> those up, but also make thumbnails that I want to save locally and don't<br>
> care if they get uploaded, maintain an index file with image metadata /<br>
> thumbnails / ... locally, save off some intermediate files, ...<br>
> For this, I would really like to see us take another look<br>
> at <a href="http://dev.w3.org/2006/webapi/fileio/fileIO.htm" target="_blank">http://dev.w3.org/2006/webapi/fileio/fileIO.htm</a> (I don't think this spec<br>
> is exactly what we need, but I like the general approach of "origins get a<br>
> virtual filesystem tucked away that they can use, they can<br>
> fread/fwrite/fseek, and optionally if they want to interact with the host FS<br>
> they can request that and then get some sub-set of that (e.g. "my documents"<br>
> or "my photos") mapped in.<br>
> -Ian<br>
<br>
</div>If we added the ability to create File objects, which could then be<br>
stored in localStorage (and WebSQL or whatever will replace it), then<br>
wouldn't we basically have the functionality you seek?<br>
<br>
What's the difference between sticking a File in the "foo/bar/bin"<br>
property on the localStorage object, vs. sicking a File object in the<br>
"foo/bar/bin" directory in some FileSystem object?<br>
<br></blockquote><div><br></div><div><div>+1 the call to add a file system like api to the storage mix</div><div><br></div></div><div>Enumerating the contents of a 'directory' is one difference. Recursively deleting a 'directory' is another. Checking creation/modification timestamps is a third. The LocalStorage big-hashmap model doesn't work well for these things in its current form. The hierarchical file system abstraction is well understand and has a long track record of usefulness.</div>
<div><br></div><div>From a windows programmer point of view</div><div>* LocalStorage is akin to the registry.</div><div>* FileSystem is akin to the file system.</div><div>* Databases is akin to structured storage.</div><div>
* AppCache is a necessary evil to do anything without a network connection.</div><div>* Workers are akin to threads/processes</div><div>* GlobalScripts/SharedContext/ApplicationContexts are akin to DLLs.</div><div><br></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Note that the latest HTML5 drafts allow for storing File objects in<br>
localStorage.<br>
<font color="#888888"><br>
/ Jonas<br>
</font></blockquote></div><br>