Method DeleteAllContents
DeleteAllContents(string)
Deletes all contents of the specified folder, including files and subdirectories.
public static bool DeleteAllContents(string pathToFolder)
Parameters
pathToFolder
stringThe path to the folder whose contents will be deleted.
Returns
- bool
true
if the operation succeeds or the folder does not exist;false
if an exception occurs during the operation.