| DiskUtilitiesTryDeleteFilesInDirectory Method (DirectoryInfo, 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(
DirectoryInfo directoryToRemoveFiles,
bool removeDirectoryFolderAlso = false
)
Parameters
- directoryToRemoveFiles
- Type: System.IODirectoryInfo
The directory to clear - removeDirectoryFolderAlso (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