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