Assembly: mscorlib (in mscorlib.dll)
Thetype exposes the following members.
|FileSystemInfo()||Initializes a new instance of the class.|
|FileSystemInfo(SerializationInfo, StreamingContext)||Initializes a new instance of the class with serialized data.|
|Attributes||Gets or sets the attributes for the current file or directory.|
|CreationTime||Gets or sets the creation time of the current file or directory.|
|CreationTimeUtc||Gets or sets the creation time, in coordinated universal time (UTC), of the current file or directory.|
|Exists||Gets a value indicating whether the file or directory exists.|
|Extension||Gets the string representing the extension part of the file.|
|FullName||Gets the full path of the directory or file.|
|LastAccessTime||Gets or sets the time the current file or directory was last accessed.|
|LastAccessTimeUtc||Gets or sets the time, in coordinated universal time (UTC), that the current file or directory was last accessed.|
|LastWriteTime||Gets or sets the time when the current file or directory was last written to.|
|LastWriteTimeUtc||Gets or sets the time, in coordinated universal time (UTC), when the current file or directory was last written to.|
|Name||For files, gets the name of the file. For directories, gets the name of the last directory in the hierarchy if a hierarchy exists. Otherwise, the Name property gets the name of the directory.|
|CreateObjRef||Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)|
|Delete||Deletes a file or directory.|
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetLifetimeService||Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)|
|GetObjectData||Sets the SerializationInfo object with the file name and additional exception information.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|InitializeLifetimeService||Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)|
|MemberwiseClone()||Creates a shallow copy of the current Object. (Inherited from Object.)|
|MemberwiseClone(Boolean)||Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)|
|Refresh||Refreshes the state of the object.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
The class contains methods that are common to file and directory manipulation. A object can represent either a file or a directory, thus serving as the basis for FileInfo or DirectoryInfo objects. Use this base class when parsing a lot of files and directories.
A derived class can inherit from only if the derived class has the AllAccess permission from the FileIOPermissionAccess enumeration.
In members that accept a path, the path can refer to a file or just a directory. The specified path can also refer to a relative path or a Universal Naming Convention (UNC) path for a server and share name. For example, all the following are acceptable paths:
"c:\\MyDir\\MyFile.txt" in C#, or "c:\MyDir\MyFile.txt" in Visual Basic.
"c:\\MyDir" in C#, or "c:\MyDir" in Visual Basic.
"MyDir\\MySubdir" in C#, or "MyDir\MySubDir" in Visual Basic.
"\\\\MyServer\\MyShare" in C#, or "\\MyServer\MyShare" in Visual Basic.
For a list of common I/O tasks, see Common I/O Tasks.
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.