File

Description

The File class is used to work with files.

Comments

All methods of this class are static. Using given methods enables user to create, delete, move and change files, also to work with files attributes and parameters that are responsible for the time of creation, of change and of the last access to a file. A work on files could be performed in a text and binary mode. It is recommended to use corresponding methods of the FileInfo class if a lot of operations on files are planned to perform.

Static class methods inherited from IFile

  Method name Brief description
The AppendBinary method opens a file for writing in a binary format and sets a cursor to the end of a file.
The AppendText method opens a file for writing in a text format and sets a cursor to the end of a file.
The Copy method copies a file.
The Delete method deletes a file.
The Exists method indicates whether the file exists.
The GetAttributes method returns file attributes.
The GetCreationTime method returns date and time of a file creation.
The GetLastAccessTime method returns date and time of the last access to a file.
The GetLastWriteTime method returns date and time of the last edit of a file.
The MoveTo method moves a file.
The Open method opens a file with a specific query of file opening and parameters of shared access.
The OpenBinaryReader method opens a file for reading in a binary format.
The OpenBinaryWriter method opens a file for writing in a binary format and sets a cursor to the beginning of a file.
The OpenTextReader method opens a file for reading in a text format.
The OpenTextWriter method opens a file for writing in a text format and sets a cursor to the beginning of a file.
The SetAttributes method changes file attributes.
The SetCreationTime method changes date and time of a file creation.
The SetLastAccessTime method changes date and time of the last access to a file.
The SetLastWriteTime method sets date and time of the last edit of a file.

See also:

IO Assembly Classes