This topic has not yet been rated - Rate this topic

FileSystemInfo Class

April 12, 2014

Provides the base class for both FileInfo and DirectoryInfo objects.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)
'Declaration
Public MustInherit Class FileSystemInfo

The FileSystemInfo type exposes the following members.

  NameDescription
Protected methodFileSystemInfoSecurity Critical. Initializes a new instance of the FileSystemInfo class.
Top
  NameDescription
Public propertyAttributesGets or sets the FileAttributes of the current FileSystemInfo.
Public propertyCreationTimeGets or sets the creation time of the current FileSystemInfo object.
Public propertyExistsGets a value indicating whether the file or directory exists.
Public propertyExtensionGets the string representing the extension part of the file.
Public propertyFullNameGets the full path of the directory or file.
Public propertyLastAccessTimeGets or sets the time the current file or directory was last accessed.
Public propertyLastWriteTimeGets or sets the time when the current file or directory was last written to.
Public propertyNameFor 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
  NameDescription
Public methodDeleteDeletes a file or directory.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRefreshRefreshes the state of the object.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top
  NameDescription
Protected fieldFullPathInfrastructure. Represents the fully qualified path of the directory or file.
Protected fieldOriginalPathInfrastructure. The path originally specified by the user, whether relative or absolute.
Top

Version Notes

Windows Phone

This type is present to support the .NET Compact Framework infrastructure in Windows Phone, and it is not intended to be used in your application code.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.