I found out today that it is not possible to delete a File object,
just by having a reference to it.
To delete a File a FileEntry object (for calling fileEntry.remove()).
To get a FileEntry corresponding to a File object the full or relative
path of the File is needed in order to call fs.root.getFile() or
parentDir.getFile() respectively. The only way to get that path is the
attribute webkitRelativePath of the File class.
Unfortunately there seems to be a bug in Webkit that leaves
webkitRelativePath empty when copying a file. In other words only
files provided from a <input> element have this attribute populated,
copying those files to a persistent local storage results in empty
webkitRelativePath. I believe this is related with bug
http://code.google.com/p/chromium/issues/detail?id=97585.
Am I missing something? Any workarounds or suggestions are
appreciated. Also if you know the right people to forward this bug
please do so.
Thank you
dpapad
Is this on ChromeOS, using the FileBrowser extension? Is it in regular Chrome?
You mention problems getting information on its path after copying it.
But you know where you've copied it to, so perhaps you're trying to
delete the source file? That's not something we permit in Chrome, but
I'd have to check on ChromeOS.
Eric
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev