File Methods |
The File type exposes the following members.
| Name | Description | |
|---|---|---|
| Close |
Closes this file.
| |
| Copy |
Copies a file to a new location.
| |
| Create |
Creates or overwrites a file at the supplied path location.
| |
| Delete |
Deletes this file.
| |
| Delete(String) |
Deletes the file at the specified path.
| |
| Dispose |
Frees the resources used by this file.
| |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| Exists |
Checks whether this file exists on the file system.
| |
| Exists(String) |
Checks whether the file at the specified path exists on the file system.
| |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetReader |
Opens and gets a StreamReader for the file at the supplied path.
| |
| GetSecurityObject |
Gets the FileSecurity object for the file specified by the supplied path.
| |
| GetSizeInBytes |
Gets the size of a file in bytes.
| |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| Move(String) |
Moves this file to a new location.
| |
| Move(String, String) |
Moves a file to a new location.
| |
| Open |
Opens a file at the supplied path location.
| |
| ReadAllAsText |
Reads the entire contents of this text file, and returns it as a string.
| |
| ReadAllAsText(FileStream) |
Reads the entire contents of a text file, and returns it as a string.
| |
| ReadAllAsText(String) |
Reads the entire contents of a text file, and returns it as a string.
| |
| ReadLine |
Reads a line of text from this file.
| |
| ReadLine(FileStream, StreamReader) |
Reads a line of text from a file's stream.
| |
| RemoveAllExplicitAccessRules(Boolean) |
Removes all explicit access rules from this file.
| |
| RemoveAllExplicitAccessRules(String, FileSecurity, Boolean) |
Removes all explicit access rules from the supplied file.
| |
| ToString | Returns a string that represents the current object. (Inherited from Object.) | |
| WriteLine(String) |
Writes a line of text to the file.
| |
| WriteLine(FileStream, String) |
Writes a line of text to the specified file stream.
|