File Members
The following tables list the members exposed by the File type.
Public Methods
Name | Description | |
---|---|---|
Copy | Copies an existing file to a new file. | |
Create | Creates or overwrites the specified file. | |
Delete | Deletes the specified file. An exception is not thrown if the specified file does not exist. | |
Exists | Determines whether the specified file exists. | |
GetAttributes | Gets the FileAttributes of the file on the path. | |
Move | Moves a specified file to a new location, providing the option to specify a new file name. | |
Open | Opens a FileStream on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option. | |
OpenRead | Opens an existing file for reading. | |
OpenWrite | Opens an existing file for writing. | |
ReadAllBytes | Opens a binary file, reads the contents of the file into a byte array, and then closes the file. | |
SetAttributes | Sets the specified FileAttributes of the file on the specified path. | |
WriteAllBytes | Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten. |