Class FileUtils
Contains static methods related to files.
public static class FileUtils
- Inheritance
-
FileUtils
Methods
- CreateFilePath(string)
Gets directory name of the specified file path and creates that directory if it is not exists.
- DeleteBinObjFiles(string)
Deletes all files in the 'bin' and 'obj' subfolders of the specified solution folder.
- DeleteIfExists(string)
Deletes the specified file if it exists.
- ExistingDirOrNull(string?)
Returns
path
if such directory exists; otherwise returns Null.
- FindFileRecursiveInAppFolder(string, string?)
Returns the full file name that match a search pattern in the application folder. Searches in all subdirectories.
- FindFirstFile(string, string, SearchOption)
Returns the full file name that match a search pattern in a specified path, and optionally searches subdirectories.
- RealFileHasSameCase(string)
Gets whether the specified file name has the same char case as file on disk.
- StringFromFile(string, Encoding?)
Reads string from the file using the specified encoding.
- StringToFile(string, string, Encoding?)
Saves string to file. If file with such name already exists, it is deleted before saving the string.
- StringToFileIfChanged(string, string, Encoding?)
Saves string to the specified file only if its contents is different from the saved string.