Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
1 out of 1 rated this helpful - Rate this topic

File Methods

The methods of the File class are listed here. For a complete list of File class members, see the File Members topic.

Public Methods

public methodstatic (Shared in Visual Basic)AppendText

Supported by the .NET Compact Framework.

Creates a StreamWriter that appends UTF-8 encoded text to an existing file.
public methodstatic (Shared in Visual Basic)Copy

Supported by the .NET Compact Framework.

Overloaded. Copies an existing file to a new file.
public methodstatic (Shared in Visual Basic)Create

Supported by the .NET Compact Framework.

Overloaded. Creates a file in the specified path.
public methodstatic (Shared in Visual Basic)CreateText

Supported by the .NET Compact Framework.

Creates or opens a file for writing UTF-8 encoded text.
public methodstatic (Shared in Visual Basic)Delete

Supported by the .NET Compact Framework.

Deletes the specified file. An exception is not thrown if the specified file does not exist.
public methodstatic (Shared in Visual Basic)Exists

Supported by the .NET Compact Framework.

Determines whether the specified file exists.
public methodstatic (Shared in Visual Basic)GetAttributes Gets the FileAttributes of the file on the path.
public methodstatic (Shared in Visual Basic)GetCreationTime

Supported by the .NET Compact Framework.

Returns the creation date and time of the specified file or directory.
public methodstatic (Shared in Visual Basic)GetCreationTimeUtc Returns the creation date and time, in coordinated universal time (UTC), of the specified file or directory.
public methodstatic (Shared in Visual Basic)GetLastAccessTime

Supported by the .NET Compact Framework.

Returns the date and time the specified file or directory was last accessed.
public methodstatic (Shared in Visual Basic)GetLastAccessTimeUtc Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last accessed.
public methodstatic (Shared in Visual Basic)GetLastWriteTime

Supported by the .NET Compact Framework.

Returns the date and time the specified file or directory was last written to.
public methodstatic (Shared in Visual Basic)GetLastWriteTimeUtc Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last written to.
public methodstatic (Shared in Visual Basic)Move

Supported by the .NET Compact Framework.

Moves a specified file to a new location, providing the option to specify a new file name.
public methodstatic (Shared in Visual Basic)Open

Supported by the .NET Compact Framework.

Overloaded. Opens a FileStream on the specified path.
public methodstatic (Shared in Visual Basic)OpenRead

Supported by the .NET Compact Framework.

Opens an existing file for reading.
public methodstatic (Shared in Visual Basic)OpenText

Supported by the .NET Compact Framework.

Opens an existing UTF-8 encoded text file for reading.
public methodstatic (Shared in Visual Basic)OpenWrite

Supported by the .NET Compact Framework.

Opens an existing file for writing.
public methodstatic (Shared in Visual Basic)SetAttributes Sets the specified FileAttributes of the file on the specified path.
public methodstatic (Shared in Visual Basic)SetCreationTime Sets the date and time the file was created.
public methodstatic (Shared in Visual Basic)SetCreationTimeUtc Sets the date and time, in coordinated universal time (UTC), that the file was created.
public methodstatic (Shared in Visual Basic)SetLastAccessTime Sets the date and time the specified file was last accessed.
public methodstatic (Shared in Visual Basic)SetLastAccessTimeUtc Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.
public methodstatic (Shared in Visual Basic)SetLastWriteTime Sets the date and time that the specified file was last written to.
public methodstatic (Shared in Visual Basic)SetLastWriteTimeUtc Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.

See Also

File Class | System.IO Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.