Delete()

DirectoryInfo::Delete() method

Removes the directory referred to by the path represented by the current object if the directory is empty.

virtual void System::IO::DirectoryInfo::Delete() override

DirectoryInfo::Delete(bool) method

Removes the directory referred to by the path represented by the current object. A parameter specifies if the content of the directory should be recursively removed if the directory is not empty.

void System::IO::DirectoryInfo::Delete(bool recursive)

Arguments

ParameterTypeDescription
recursiveboolSpecifies if the content of the directory should be recursively removed if it is not empty

See Also