Update 2016 : The Catalogs and System API file has been abandoned and what little support it has made in browsers is discarded. The original File API is still valid, but material providing the entire file area on the user system has been left behind.
Looks like DirectoryEntry#removeRecursively does this. It says that you cannot delete the root of the file system, but you can scroll through the entries in the root and delete them recursively (or just always work with the root subdirectory, thereby allowing you to delete it using a single line).
Tj crowder
source share