| DiskUtilitiesTryDeleteFilesInDirectory Method (String, Boolean) |
Used to easily clear a directory of its contents.
Namespace:
DustProductions.Core
Assembly:
DustProductions.Core (in DustProductions.Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static bool TryDeleteFilesInDirectory(
string directoryPath,
bool deleteDirectoryFolderAlso = false
)
Parameters
- directoryPath
- Type: SystemString
The path to the directory to clear - deleteDirectoryFolderAlso (Optional)
- Type: SystemBoolean
Delete the directory in addition to all the files inside of it
Return Value
Type:
BooleanTrue if the deletion is successful, false otherwise
See Also