All C# extension methods for type directoryinfo
-
DeleteFiles
Deletes the files in a certain directory that comply to the searchpattern. The searchpattern can contain * and ? (the normal wildcard characters). The function can also search in the subdirectories.
-
GetSize
This method extends the DirectoryInfo class to return the size in bytes of the directory represented by the DirectoryInfo instance.
-
IsNotHidden
Filters out directories that are hidden
-
DeleteWithPrejudice and Purge
These 2 extension method allows you to delete a folder or just purge all the folder content even if there are Readonly, System, and/or Hidden attributes files in it. The default Delete method doesn't work if there are files with Readonly, System, and/or Hidden attributes.