Home Cooker Classes Others Rice CookerGX
Classes  >  directory  >  Delete(bool)
directory class : Delete(bool) method


Removes this directory with the specified operation.


directoryInstance.Delete(bool recursive)


boolrecursiveA bool value that determine whether to remove children at the same time.

Return value


Sample code

//anyDirectory is a instance of directory type.

anyDirectory.Delete(true);//The anyDirectory is removed along with the children.


It's a wrapper of the System.IO.DirectoryInfo.Delete(Boolean).

If the argument is true, the all subdirectories and files in this directory will be removed along with this directory.

If the argument is false, this directory will remove only when it is empty. In other words, this method behaves in the same way as the Delete() method.

Links for reference

Copyright © Rice All rights reserved.