[whatwg] Drag-and-drop folders/files support with directory structure using DirectoryEntry

Glenn Maynard glenn at zewt.org
Fri Apr 6 06:37:49 PDT 2012


On Thu, Apr 5, 2012 at 11:42 PM, Kinuko Yasuda <kinuko at chromium.org> wrote:

> Does this actually need to be async?  The only information you need to
> create the Entry are the filename and the file type (file or directory),
> which the browser can load before performing the drop, so no file I/O is
> needed here.
>
> I wanted to make it synchronous, but determining the file type (file or
> directory) usually requires blocking file I/O operation, which could spoil
> the async nature of this proposal if we perform the blocking stat operation
> on every drag-enter event.
>

This can be done before exposing the drop event to the page in the first
place, though, which means it can still happen asynchronously.  The same
can be done for <input> file pickers.

-- 
Glenn Maynard



More information about the whatwg mailing list