Back to index
|NS_HIDDEN_ (nsresult) DeleteDir(nsIFile *dir|
|This routine attempts to delete a directory that may contain some files that are still in use. |
|nsCOMPtr< nsIFile > *||result|
This routine attempts to delete a directory that may contain some files that are still in use.
Resolves a relative path string containing "." and ".." with respect to a base path (assumed to already be resolved).
This routine returns the trash directory corresponding to the given directory.
This later point is only an issue on Windows and a few other systems.
If the moveToTrash parameter is true, then the process for deleting the directory creates a sibling directory of the same name with the ".Trash" suffix. It then attempts to move the given directory into the corresponding trash folder (moving individual files if necessary). Next, it proceeds to delete each file in the trash folder on a low-priority background thread.
If the moveToTrash parameter is false, then the given directory is deleted directly.
If the sync flag is true, then the delete operation runs to completion before this function returns. Otherwise, deletion occurs asynchronously.