Mono Class Library: Namespaces

System.IO Namespace

The System.IO namespace contains classes for reading and writing data from streams and interacting with the filesystem. [Edit]

Remarks

The System.IO namespace contains classes for reading and writing binary data from streams, reading and writing character data from readers and writers, and interacting with the file system in a platform-independent manner.

The System.IO.Stream class is the abstract base class of all streams, which provide a common mechanism for reading and writing binary data. System.IO.Streams support sequential reading or writing or both, and can also support random access. System.IO.Streams can be used synchronously and asynchronously.

There are three standard System.IO.Stream implementations. The System.IO.FileStream class provides stream access to a file on the local file system. The System.IO.MemoryStream class provides stream access to a byte array in memory. The System.IO.BufferedStream wraps another stream, providing buffered access to the underlying data, which can be used to improve performance. The System.IO.BinaryReader and System.IO.BinaryWriter classes provide convenience functions for reading and writing primitive types to and from steams.

System.IO.TextReader provides a sequential stream of characters or strings, and System.IO.TextWriter is a target for writing a sequential stream of chacters or strings. The System.IO.StreamReader and System.IO.StreamWriter classes provide character-based access to a System.IO.Stream using a specified encoding. The System.IO.StringReader provides a reader for the character data in a string, and the System.IO.StringWriter provides a writer to System.Text.StringBuffers.

The remaining classes provide access to the local file system. The System.IO.Directory and System.IO.File classes contain static methods for manipulating directories and files, respectively. System.IO.DirectoryInfo and System.IO.FileInfo objects actually represent files and folders on the file system (actually paths to files and folders which may or may not exist). They contain instance methods similar to System.IO.Directory and System.IO.File. The System.IO.Path class contains static methods for manipulating paths on the local file system in a platform-independent manner.

[Edit]

Classes

TypeReason
BinaryReaderA simple class to do some limited binary I/O.
BinaryWriterLimited binary writer.
BufferedStreamProvides a wrapper layer around an existing stream to enhance read/write performance.
Directory Provides information and performs operations on directories.
DirectoryInfoRepresents information about a directory in the filesystem.
DirectoryNotFoundException Represents the error that occurs when part of a file or directory argument cannot be found.
DriveInfoDocumentation for this section has not yet been entered.
DriveNotFoundExceptionDocumentation for this section has not yet been entered.
EndOfStreamExceptionRepresents the error that occurs when an attempt is made to read past the end of a stream.
ErrorEventArgsDocumentation for this section has not yet been entered.
File Provides information and performs operations on files .
FileInfoDocumentation for this section has not yet been entered.
FileLoadException Represents the error that occurs when a System.Reflection.Assembly file is found but cannot be loaded.
FileNotFoundException Represents the error that occurs when a file path argument specifies a file that does not exist.
FileStreamExposes a System.IO.Stream around a file, supporting both synchronous and asynchronous read and write operations.
FileSystemEventArgsDocumentation for this section has not yet been entered.
FileSystemInfoDocumentation for this section has not yet been entered.
FileSystemWatcherMonitors File System's changes in directories, files and files inside directories.
InternalBufferOverflowExceptionDocumentation for this section has not yet been entered.
InvalidDataExceptionDocumentation for this section has not yet been entered.
IODescriptionAttributeDocumentation for this section has not yet been entered.
IOExceptionRepresents the error that occurs when an I/O operation fails.
MemoryStream Provides support for creating and using a stream whose backing store is memory.
PathPerforms operations on string instances that contain file or directory path information.
PathTooLongException Represents the error that occurs when a directory or file name is longer than the system-defined maximum length.
RenamedEventArgsDocumentation for this section has not yet been entered.
StreamAbstract base class for all stream implementations.
StreamReaderImplements a System.IO.Stream that reads characters from a byte stream in a particular encoding.
StreamWriterImplements a System.IO.Stream wrapper that writes characters to a stream in a particular encoding.
StringReader Implements a System.IO.TextReader that reads from a string.
StringWriter Implements a System.IO.TextWriter that writes information to a string.
TextReaderRepresents an object that can read a sequential series of characters.
TextWriter Represents a writer that can write a sequential series of characters.
UnmanagedMemoryStreamDocumentation for this section has not yet been entered.

Structs

TypeReason
WaitForChangedResultDocumentation for this section has not yet been entered.

Delegates

TypeReason
ErrorEventHandlerDocumentation for this section has not yet been entered.
FileSystemEventHandlerDocumentation for this section has not yet been entered.
RenamedEventHandlerDocumentation for this section has not yet been entered.

Enumerations

TypeReason
DriveTypeDocumentation for this section has not yet been entered.
FileAccess Defines constants used to specify the level of file access being requested.
FileAttributesDocumentation for this section has not yet been entered.
FileMode Specifies how the operating system opens a file.
FileOptionsDocumentation for this section has not yet been entered.
FileShare Specifies the level of access permitted for a file that is already in use.
NotifyFiltersDocumentation for this section has not yet been entered.
SearchOptionDocumentation for this section has not yet been entered.
SeekOrigin Defines the seek reference positions.
WatcherChangeTypesDocumentation for this section has not yet been entered.