Skip to main content
System.IO Namespace
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

The System.IO namespace contains types that allow reading and writing to files and data streams, and types that provide basic file and directory support.

ClassDescription
System_CAPS_pubclass BinaryReader

Reads primitive data types as binary values in a specific encoding.

System_CAPS_pubclass BinaryWriter

Writes primitive types in binary to a stream and supports writing strings in a specific encoding.

System_CAPS_pubclass BufferedStream

Adds a buffering layer to read and write operations on another stream. This class cannot be inherited.

System_CAPS_pubclass Directory

Exposes static methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass DirectoryInfo

Exposes instance methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass DirectoryNotFoundException

The exception that is thrown when part of a file or directory cannot be found.

System_CAPS_pubclass DriveInfo

Provides access to information on a drive.

System_CAPS_pubclass DriveNotFoundException

The exception that is thrown when trying to access a drive or share that is not available.

System_CAPS_pubclass EndOfStreamException

The exception that is thrown when reading is attempted past the end of a stream.

System_CAPS_pubclass ErrorEventArgs

Provides data for the FileSystemWatcherError event.

System_CAPS_pubclass File

Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of FileStream objects.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass FileFormatException

The exception that is thrown when an input file or a data stream that is supposed to conform to a certain file format specification is malformed.

System_CAPS_pubclass FileInfo

Provides properties and instance methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of FileStream objects. This class cannot be inherited.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass FileLoadException

The exception that is thrown when a managed assembly is found but cannot be loaded.

System_CAPS_pubclass FileNotFoundException

The exception that is thrown when an attempt to access a file that does not exist on disk fails.

System_CAPS_pubclass FileStream

Provides a Stream for a file, supporting both synchronous and asynchronous read and write operations.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass FileSystemEventArgs

Provides data for the directory events: Changed, Created, Deleted.

System_CAPS_pubclass FileSystemInfo

Provides the base class for both FileInfo and DirectoryInfo objects.

System_CAPS_pubclass FileSystemWatcher

Listens to the file system change notifications and raises events when a directory, or file in a directory, changes.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass InternalBufferOverflowException

The exception thrown when the internal buffer overflows.

System_CAPS_pubclass InvalidDataException

The exception that is thrown when a data stream is in an invalid format.

System_CAPS_pubclass IODescriptionAttribute

Sets the description visual designers can display when referencing an event, extender, or property.

System_CAPS_pubclass IOException

The exception that is thrown when an I/O error occurs.

System_CAPS_pubclass MemoryStream

Creates a stream whose backing store is memory.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass Path

Performs operations on String instances that contain file or directory path information. These operations are performed in a cross-platform manner.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass PathTooLongException

The exception that is thrown when a path or fully qualified file name is longer than the system-defined maximum length.

System_CAPS_pubclass PipeException

Thrown when an error occurs within a named pipe.

System_CAPS_pubclass RenamedEventArgs

Provides data for the Renamed event.

System_CAPS_pubclass Stream

Provides a generic view of a sequence of bytes. This is an abstract class.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass StreamReader

Implements a TextReader that reads characters from a byte stream in a particular encoding.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass StreamWriter

Implements a TextWriter for writing characters to a stream in a particular encoding.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclass StringReader

Implements a TextReader that reads from a string.

System_CAPS_pubclass StringWriter

Implements a TextWriter for writing information to a string. The information is stored in an underlying StringBuilder.

System_CAPS_pubclass TextReader

Represents a reader that can read a sequential series of characters.

System_CAPS_pubclass TextWriter

Represents a writer that can write a sequential series of characters. This class is abstract.

System_CAPS_pubclass UnmanagedMemoryAccessor

Provides random access to unmanaged blocks of memory from managed code.

System_CAPS_pubclass UnmanagedMemoryStream

Provides access to unmanaged blocks of memory from managed code.

StructureDescription
System_CAPS_pubstructure WaitForChangedResult

Contains information on the change that occurred.

DelegateDescription
System_CAPS_pubdelegate ErrorEventHandler

Represents the method that will handle the Error event of a FileSystemWatcher object.

System_CAPS_pubdelegate FileSystemEventHandler

Represents the method that will handle the Changed, Created, or Deleted event of a FileSystemWatcher class.

System_CAPS_pubdelegate RenamedEventHandler

Represents the method that will handle the Renamed event of a FileSystemWatcher class.

EnumerationDescription
System_CAPS_pubenum DriveType

Defines constants for drive types, including CDRom, Fixed, Network, NoRootDirectory, Ram, Removable, and Unknown.

System_CAPS_pubenum FileAccess

Defines constants for read, write, or read/write access to a file.

System_CAPS_pubenum FileAttributes

Provides attributes for files and directories.

System_CAPS_pubenum FileMode

Specifies how the operating system should open a file.

System_CAPS_pubenum FileOptions

Represents advanced options for creating a FileStream object.

System_CAPS_pubenum FileShare

Contains constants for controlling the kind of access other FileStream objects can have to the same file.

System_CAPS_pubenum HandleInheritability

Specifies whether the underlying handle is inheritable by child processes.

System_CAPS_pubenum NotifyFilters

Specifies changes to watch for in a file or folder.

System_CAPS_pubenum SearchOption

Specifies whether to search the current directory, or the current directory and all subdirectories.

System_CAPS_pubenum SeekOrigin

Specifies the position in a stream to use for seeking.

System_CAPS_pubenum WatcherChangeTypes

Changes that might occur to a file or directory.

Return to top