This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
File Members
Public:
Constructor
Properties
Attributes |
Gets or sets the attributes of the current file. |
CreationTime |
Gets the creation time of the current file. |
Directory |
Creates an instance of the parent directory. |
DirectoryName |
Returns the name of the directory that the file is in. |
Exists |
Determines whether a file exists. |
FullName (inherited from FileSystemEntry) |
Retrieves the full path of the directory or file. |
IsDirectory |
Indicates whether the object is a directory. |
IsFile |
Indicates whether the object is a file. |
LastAccessTime |
Contains the time the current file or directory was last accessed. |
LastWriteTime |
Returns the time when the current file or directory was last written to. |
Length |
Contains the size of the current file or directory. |
Name |
Retrieves the name of the file. |
Methods
AppendText |
Overloaded. Creates a StreamWriter that appends text to a file. |
ChangeExtension |
Changes a file extension. |
Copy |
Overloaded. Copies an existing file to a new file. |
CopyTo |
Overloaded. Copies an existing file to a new file. |
Create |
Overloaded. Creates a file in the specified path. |
CreateText |
Overloaded. Creates a StreamWriter that writes a new text file. |
Delete |
Overloaded. Deletes a file. |
Equals (inherited from Object) |
Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality). |
FileExists |
Determines whether a file exists on the specified path. |
GetDirectoryNameFromPath |
Returns the directory path of a file. |
GetExtension |
Returns the extension of the specified path. |
GetFileNameFromPath |
Returns the name and extension parts of the given path. |
GetHashCode (inherited from Object) |
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetTempFileName |
Returns a unique temporary file name and creates a 0-byte file by that name on disk. |
GetType (inherited from Object) |
Gets the Type of the Object. |
HasExtension |
Determines whether a path includes a file extension. |
Move |
Moves a specified file to a new location and potentially a new file name. This method does work across volumes. |
MoveTo |
Moves a given file to a new location and potentially a new file name. This method works across volumes. |
Open |
Overloaded. Opens a file with various read-write and sharing privileges. |
OpenRead |
Overloaded. Creates a read-only Stream around a file.. |
OpenText |
Overloaded. Creates a StreamReader that reads from an existing text file. |
OpenWrite |
Overloaded. Creates a read-write Stream. |
Refresh |
Refreshes the state of the object. |
ToString |
Returns the fully qualified path. |
Protected:
Methods
Finalize (inherited from Object) |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere. |
MemberwiseClone (inherited from Object) |
Creates a shallow copy of the current Object. |
Fields
FullPath (inherited from FileSystemEntry) |
Retrieves the fully qualified path of the directory. |
See Also
File Class | System.IO Namespace