Click or drag to resize
FileSystemInfo Class
Provides the base class for both FileInfo and DirectoryInfo objects.
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    System.IOFileSystemInfo
      System.IODirectoryInfo
      System.IOFileInfo

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public abstract class FileSystemInfo : MarshalByRefObject, 
	ISerializable

The FileSystemInfo type exposes the following members.

Methods
  NameDescription
Public methodDelete
Deletes a file or directory.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRefresh
Refreshes the state of the object.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Protected fieldFullPath
Represents the fully qualified path of the directory or file.
Protected fieldOriginalPath
The path originally specified by the user, whether relative or absolute.
Top
Properties
  NameDescription
Public propertyExists
Gets a value indicating whether the file or directory exists.
Public propertyExtension
Gets the string representing the extension part of the file.
Public propertyFullName
Gets the full path of the directory or file.
Public propertyName
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
See Also