FileSystemInfo Class
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Provides the base class for both FileInfo and DirectoryInfo objects.
Inheritance Hierarchy
System.Object
System.IO.FileSystemInfo
System.IO.DirectoryInfo
System.IO.FileInfo
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
<ComVisibleAttribute(True)> _
Public MustInherit Class FileSystemInfo
[ComVisibleAttribute(true)]
public abstract class FileSystemInfo
The FileSystemInfo type exposes the following members.
Constructors
Name | Description | |
---|---|---|
FileSystemInfo | Initializes a new instance of the FileSystemInfo class. |
Top
Properties
Name | Description | |
---|---|---|
Attributes | When called by trusted applications, gets or sets the FileAttributes of the current FileSystemInfo. | |
CreationTime | When called by trusted applications, gets or sets the creation time of the current FileSystemInfo object. | |
Exists | Gets a value indicating whether the file or directory exists. | |
Extension | Gets the string representing the extension part of the file. | |
FullName | When called by trusted applications, gets the full path of the directory or file. | |
LastAccessTime | When called by trusted applications, gets or sets the time the current file or directory was last accessed. | |
LastWriteTime | When called by trusted applications, gets or sets the time 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. |
Top
Methods
Name | Description | |
---|---|---|
Delete | When called by trusted applications, 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 the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Refresh | Refreshes the state of the object. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Fields
Name | Description | |
---|---|---|
FullPath | Infrastructure. Represents the fully qualified path of the directory or file. | |
OriginalPath | Infrastructure. The path originally specified by the user, whether relative or absolute. |
Top
Remarks
Platform Notes
Silverlight for Windows Phone
This type is present to support the .NET Compact Framework infrastructure in Silverlight for Windows Phone, and it is not intended to be used in your application code.
Version Information
Silverlight
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
XNA Framework
Supported in: Xbox 360, Windows Phone OS 7.0
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.