System.IO namespaces for UWP apps

System.IO namespaces for UWP apps

 

The System.IO, System.IO.Compression, and System.IO.IsolatedStorage namespaces contain types that support reading and writing data to streams; basic compression and decompression services for streams; and allow the creation and use of isolated stores.

This topic displays the types in the System.IO and System.IO.Compression namespaces that are included in .NET for UWP apps. Note that .NET for UWP apps does not include all the members of each type. For information about individual types, see the linked topics. The documentation for a type indicates which members are included in .NET for UWP apps.

Types supported in .NET for UWP apps

Description

BinaryReader

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

BinaryWriter

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

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.

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.

DirectoryNotFoundException

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

EndOfStreamException

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

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.

FileAccess

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

FileAttributes

Provides attributes for files and directories.

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.

FileLoadException

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

FileMode

Specifies how the operating system should open a file.

FileNotFoundException

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

FileOptions

Represents advanced options for creating a FileStream object.

FileShare

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

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.

FileSystemInfo

Provides the base class for both FileInfo and DirectoryInfo objects.

HandleInheritability

Specifies whether the underlying handle is inheritable by child processes.

InvalidDataException

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

IOException

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

MemoryStream

Creates a stream whose backing store is memory.

Path

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

PathTooLongException

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

SearchOption

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

SeekOrigin

Provides the fields that represent reference points in streams for seeking.

Stream

Provides a generic view of a sequence of bytes.

StreamReader

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

StreamWriter

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

StringReader

Implements a TextReader that reads from a string.

StringWriter

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

TextReader

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

TextWriter

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

UnmanagedMemoryAccessor

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

UnmanagedMemoryStream

Provides access to unmanaged blocks of memory from managed code.

WindowsRuntimeStorageExtensions

Contains extension methods for the IStorageFile and IStorageFolder interfaces in the wrt when developing win8_appname_long apps.

WindowsRuntimeStreamExtensions

Contains extension methods for converting between streams in the wrt and managed streams in the net_win8_profile.

Types supported in the .NET for UWP apps

Description

CompressionLevel

Specifies values that indicate whether a compression operation emphasizes speed or compression size.

CompressionMode

Specifies whether to compress or decompress the underlying stream.

DeflateStream

Provides methods and properties for compressing and decompressing streams using the Deflate algorithm.

GZipStream

Provides methods and properties used to compress and decompress streams.

ZipArchive

Represents a zip archive.

ZipArchiveEntry

Represents an entry in the zip archive.

ZipArchiveMode

Specifies values for interacting with zip archive entries.

ZipFile

Provides static methods for creating; extracting; and opening zip archives.

ZipFileExtensions

Provides extension methods for the ZipArchive and ZipArchiveEntry classes.

Types supported in the .NET for UWP apps

Description

IsolatedStorageException

The exception that is thrown when an operation in isolated storage fails.

IsolatedStorageFile

Represents an isolated storage area containing files and directories.

IsolatedStorageFileStream

Exposes a file within isolated storage.

Show:
© 2017 Microsoft