Skip to main content
.NET Framework Class Library
System.IO Namespace

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.

Classes
  ClassDescription
Public class Supported by Portable Class Library BinaryReaderReads primitive data types as binary values in a specific encoding.
Public class Supported by Portable Class Library BinaryWriterWrites primitive types in binary to a stream and supports writing strings in a specific encoding.
Public class BufferedStreamAdds a buffering layer to read and write operations on another stream. This class cannot be inherited.
Public class DirectoryExposes 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.
Public class DirectoryInfoExposes 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.
Public class DirectoryNotFoundExceptionThe exception that is thrown when part of a file or directory cannot be found.
Public class DriveInfoProvides access to information on a drive.
Public class DriveNotFoundExceptionThe exception that is thrown when trying to access a drive or share that is not available.
Public class Supported by Portable Class Library EndOfStreamExceptionThe exception that is thrown when reading is attempted past the end of a stream.
Public class ErrorEventArgsProvides data for the FileSystemWatcherError event.
Public class FileProvides 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.
Public class FileFormatExceptionThe 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.
Public class FileInfoProvides 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.
Public class FileLoadExceptionThe exception that is thrown when a managed assembly is found but cannot be loaded.
Public class Supported by Portable Class Library FileNotFoundExceptionThe exception that is thrown when an attempt to access a file that does not exist on disk fails.
Public class FileStreamExposes a Stream around 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.
Public class FileSystemEventArgsProvides data for the directory events: Changed, Created, Deleted.
Public class FileSystemInfoProvides the base class for both FileInfo and DirectoryInfo objects.
Public class FileSystemWatcherListens 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.
Public class InternalBufferOverflowExceptionThe exception thrown when the internal buffer overflows.
Public class Supported by Portable Class Library InvalidDataExceptionThe exception that is thrown when a data stream is in an invalid format.
Public class IODescriptionAttributeSets the description visual designers can display when referencing an event, extender, or property.
Public class Supported by Portable Class Library IOExceptionThe exception that is thrown when an I/O error occurs.
Public class Supported by Portable Class Library MemoryStreamCreates a stream whose backing store is memory.To browse the .NET Framework source code for this type, see the Reference Source.
Public class PathPerforms 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.
Public class PathTooLongExceptionThe exception that is thrown when a path or file name is longer than the system-defined maximum length.
Public class PipeExceptionThrown when an error occurs within a named pipe.
Public class RenamedEventArgsProvides data for the Renamed event.
Public class Supported by Portable Class Library StreamProvides 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.
Public class Supported by Portable Class Library StreamReaderImplements 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.
Public class Supported by Portable Class Library StreamWriterImplements 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.
Public class Supported by Portable Class Library StringReaderImplements a TextReader that reads from a string.
Public class Supported by Portable Class Library StringWriterImplements a TextWriter for writing information to a string. The information is stored in an underlying StringBuilder.
Public class Supported by Portable Class Library TextReaderRepresents a reader that can read a sequential series of characters.
Public class Supported by Portable Class Library TextWriterRepresents a writer that can write a sequential series of characters. This class is abstract.
Public class UnmanagedMemoryAccessorProvides random access to unmanaged blocks of memory from managed code.
Public class UnmanagedMemoryStreamProvides access to unmanaged blocks of memory from managed code.
Public class WindowsRuntimeStorageExtensionsContains extension methods for the IStorageFile and IStorageFolder interfaces in the Windows Runtime when developing Windows Store apps.
Public class WindowsRuntimeStreamExtensionsContains extension methods for converting between streams in the Windows Runtime and managed streams in the .NET for Windows Store apps.
Structures
  StructureDescription
Public structure WaitForChangedResultContains information on the change that occurred.
Delegates
  DelegateDescription
Public delegate ErrorEventHandlerRepresents the method that will handle the Error event of a FileSystemWatcher object.
Public delegate FileSystemEventHandlerRepresents the method that will handle the Changed, Created, or Deleted event of a FileSystemWatcher class.
Public delegate RenamedEventHandlerRepresents the method that will handle the Renamed event of a FileSystemWatcher class.
Enumerations
  EnumerationDescription
Public enumeration DriveTypeDefines constants for drive types, including CDRom, Fixed, Network, NoRootDirectory, Ram, Removable, and Unknown.
Public enumeration FileAccessDefines constants for read, write, or read/write access to a file.
Public enumeration FileAttributesProvides attributes for files and directories.
Public enumeration FileModeSpecifies how the operating system should open a file.
Public enumeration FileOptionsRepresents advanced options for creating a FileStream object.
Public enumeration FileShareContains constants for controlling the kind of access other FileStream objects can have to the same file.
Public enumeration HandleInheritabilitySpecifies whether the underlying handle is inheritable by child processes.
Public enumeration NotifyFiltersSpecifies changes to watch for in a file or folder.
Public enumeration SearchOptionSpecifies whether to search the current directory, or the current directory and all subdirectories.
Public enumeration Supported by Portable Class Library SeekOriginSpecifies the position in a stream to use for seeking.
Public enumeration WatcherChangeTypesChanges that might occur to a file or directory.