File |
public sealed class FileInfo : FileSystemInfo
The FileInfo type exposes the following members.
| Name | Description | |
|---|---|---|
| Attributes |
Gets or sets the FileAttributes of the current object.
(Overrides FileSystemInfoAttributes) | |
| CreationTime |
Gets the creation time of the current object.
(Overrides FileSystemInfoCreationTime) | |
| Directory | Return the DirectoryInfo for the parent directory. | |
| DirectoryName | Return the the directory's name. | |
| Exists |
Determines if the file exists on the system.
(Overrides FileSystemInfoExists) | |
| Extension |
Gets the string representing the extension part of the file.
(Overrides FileSystemInfoExtension) | |
| FullName |
Return the full name of the file path
(Overrides FileSystemInfoFullName) | |
| LastAccessTime |
Gets or sets the time the current file or directory was last accessed.
(Overrides FileSystemInfoLastAccessTime) | |
| LastWriteTime |
Gets or sets the time when the current file or directory was last written to.
(Overrides FileSystemInfoLastWriteTime) | |
| Length | Return the the length of the file, in bytes. | |
| Name |
Return the name of file.
(Overrides FileSystemInfoName) |
| Name | Description | |
|---|---|---|
| AppendText | Creates a StreamWriter that appends text to the file represented by this instance of the FileInfo. | |
| CopyTo(String) | Copies the specified file to a new file location. | |
| CopyTo(String, Boolean) | Copies the specified file to a new file location with the option to overwrite. | |
| Create | Creates a file. | |
| CreateText | Creates a StreamWriter that writes a new text file. | |
| Delete |
Delete the file.
(Overrides FileSystemInfoDelete) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| MoveTo | Moves the specified file to the destination with possibly a new file name. | |
| Open(FileMode) | Opens a file in the specified mode. | |
| Open(FileMode, FileAccess) | Opens the current file with the specified mode and access. | |
| Open(FileMode, FileAccess, FileShare) | Opens a file in the specified mode with read, write, or read/write access and the specified sharing option. | |
| OpenRead | Opens the current file with Read only access. | |
| OpenText | Creates a StreamReader with UTF8 encoding that reads from an existing text file. | |
| OpenWrite | Opens the current file with write only access. | |
| Refresh |
Refreshes the state of the object.
(Overrides FileSystemInfoRefresh) | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |