System.IO.FileSystemInfo Class

Provides the base class for both System.IO.FileInfo and System.IO.DirectoryInfo objects.

See Also: FileSystemInfo Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public abstract class FileSystemInfo : MarshalByRefObject, System.Runtime.Serialization.ISerializable

Remarks

The System.IO.FileSystemInfo class contains methods that are common to file and directory manipulation. A System.IO.FileSystemInfo object can represent either a file or a directory, thus serving as the basis for System.IO.FileInfo or System.IO.DirectoryInfo objects. Use this base class when parsing a lot of files and directories.

A derived class can inherit from System.IO.FileSystemInfo only if the derived class has the AllAccess permission from the System.Security.Permissions.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:

For a list of common I/O tasks, see Common I/O Tasks.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0