FileInfo Methods
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Include Protected Members
Include Inherited Members
Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members
The FileInfo type exposes the following members.
Methods
Name | Description | |
---|---|---|
AppendText | When it is called by trusted applications, creates a StreamWriter that appends text to the file represented by this instance of the FileInfo. | |
CopyTo(String) | When it is called by trusted applications, copies an existing file to a new file, disallowing the overwriting of an existing file. | |
CopyTo(String, Boolean) | When it is called by trusted applications, copies an existing file to a new file, allowing the overwriting of an existing file. | |
Create | When it is called by trusted applications, creates a file. | |
CreateText | When it is called by trusted applications, creates a StreamWriter that writes a new text file. | |
Delete | When it is called by trusted applications, permanently deletes a file. (Overrides FileSystemInfo.Delete().) | |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MoveTo | When it is called by trusted applications, moves a specified file to a new location, providing the option to specify a new file name. | |
Open(FileMode) | When it is called by trusted applications, opens a file in the specified mode. | |
Open(FileMode, FileAccess) | When it is called by trusted applications, opens a file in the specified mode with read, write, or read/write access. | |
Open(FileMode, FileAccess, FileShare) | When it is called by trusted applications, opens a file in the specified mode with read, write, or read/write access and the specified sharing option. | |
OpenRead | Creates a read-only FileStream. | |
OpenText | Creates a StreamReader with UTF8 encoding that reads from an existing text file. | |
OpenWrite | When it is called by trusted applications, creates a write-only FileStream. | |
Refresh | Refreshes the state of the object. (Inherited from FileSystemInfo.) | |
ToString | Returns the path as a string. (Overrides Object.ToString().) |
Top