FileInfo Members

The following tables list the members exposed by the FileInfo type.

Public Constructors

Name Description
Public Method FileInfo Initializes a new instance of the FileInfo class, which acts as a wrapper for a file path.

Public Properties

Name Description
Public Property Directory Gets an instance of the parent directory.
Public Property DirectoryName Gets a string representing the directory's full path.
Public Property Exists Gets a value indicating whether a file exists.
Public Property Length Gets the size, in bytes, of the current file.
Public Property Name Gets the name of the file.

Public Methods

Name Description
Public Method Create Creates a file.
Public Method Delete Permanently deletes a file.
Public Method ToString Returns the path as a string.

See Also

Reference

FileInfo Class
System.IO Namespace