← Interactive API Explorer
Namespace: System.IO

FileInfo

Provides properties and instance methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of FileStream objects. This class cannot be inherited.

Properties (2)

String Name
Gets the name of the file.
Value: The name of the file.
String DirectoryName
Gets a string representing the directory's full path.
Value: A string representing the directory's full path.

Methods (1)

FileInfo(String)Constructor
Initializes a new instance of the FileInfo class, which acts as a wrapper for a file path.
ParameterDescription
fileNameThe fully qualified name of the new file, or the relative file name. Do not end the path with the directory separator character.