Commons IO : FileUtils
This utility provides a set of facilities for file manipulation.
Facilities are provided in the following areas:
- writing to a file with content either in byte, char or string
- reading from a file
- copying files and directories (deep recursive)
- deleting files and directories (deep recursive)
- converting to and from a URL
- comparing file content
- modify file last changed date by "touching" it
||Clean a directory without deleting it
||Combines two path strings.
||This method compares the content of 2 files.
||Returns a human-readable version of the file size (original is in bytes).
||Gets information about the files in a directory and puts it in an array of strings.
||Checks if the giving File exists, and returns its length
||Returns an array of abstract pathnames representing the files and directories of the specified path.
||Get an array of files info from a directory.
||Get all the files that matches a wildcard pattern, eg. (*.tmp)
||Returns Absolute Path (Fix for 260 Char Limit of Path.GetFullPath(...))
||Get Relative Path
||Determine if a path provided is the path of a file
||Determine if a file provided is hidden
||Tests if the specified file is newer than the reference file.
||Checks if a file have write permissions
||Read binary context of a file.
||Read the content of the text file.
||Remove a file or similar files if wildcard is included.
||Remove a file or Directory recursively
||Save content into a file
||Sets the read-only property of the file to true.
||Split the path into array of string
||Convert from a URL to a FileInfo.
||Implements the same behaviour as the "touch" utility on Unix. It creates a new file with size 0 or, if the file exists already, it is opened and closed without modifying it, but updating the file date and time.
||Creates an instance of System.Uri class with the pech specified
||Write content to a file. See 'Save' above.