Click or drag to resize

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
C#
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: Boolean
True if the deletion is successful, false otherwise
See Also