System::IO Namespace Reference

Namespaces

 Compression
 

Classes

class  BinaryReader
 
class  BinaryWriter
 
class  BufferedStream
 
class  Directory
 
class  DirectoryInfo
 
class  File
 
class  FileInfo
 
class  FileStream
 
class  FileSystemInfo
 
class  FileSystemInfoStat
 Represents information about a file or directory. More...
 
class  MemoryStream
 
class  Path
 
class  Stream
 
class  StreamReader
 
class  StreamWriter
 
class  StringReader
 
class  StringWriter
 
class  TextReader
 
class  TextWriter
 
class  UnmanagedMemoryStream
 

Typedefs

typedef SharedPtr< BinaryWriterBinaryWriterPtr
 An alias for a shared pointer to this class. More...
 

Enumerations

enum  FileAccess { FileAccess::Read = 0x00000001, FileAccess::Write = 0x00000002, FileAccess::ReadWrite = Read | Write }
 Specifies the type of access when opening the file. More...
 
enum  FileAttributes {
  FileAttributes::Archive = 0x00020, FileAttributes::Compressed = 0x00800, FileAttributes::Device = 0x00040, FileAttributes::Directory = 0x00010,
  FileAttributes::Encrypted = 0x04000, FileAttributes::Hidden = 0x00002, FileAttributes::IntegrityStream = 0x8000, FileAttributes::Normal = 0x00080,
  FileAttributes::NotContentIndexed = 0x02000, FileAttributes::NoScrubData = 0x20000, FileAttributes::Offline = 0x01000, FileAttributes::ReadOnly = 0x00001,
  FileAttributes::ReparsePoint = 0x00400, FileAttributes::SparseFile = 0x00200, FileAttributes::System = 0x00004, FileAttributes::Temporary = 0x00100,
  FileAttributes::Invalid = 0
}
 Represents attributes of a directory or a file. More...
 
enum  FileMode {
  FileMode::CreateNew = 1, FileMode::Create = 2, FileMode::Open = 3, FileMode::OpenOrCreate = 4,
  FileMode::Truncate = 5, FileMode::Append = 6
}
 Specifies how a file should be opened. More...
 
enum  FileOptions {
  FileOptions::None = 0, FileOptions::Encrypted = 0x4000, FileOptions::DeleteOnClose = 0x4000000, FileOptions::SequentialScan = 0x8000000,
  FileOptions::RandomAccess = 0x10000000, FileOptions::Asynchronous = 0x40000000, FileOptions::WriteThrough = -1
}
 Represents advanced options for creating FileStream object. More...
 
enum  FileShare {
  FileShare::None = 0, FileShare::Read = 1, FileShare::Write = 2, FileShare::ReadWrite = 3,
  FileShare::Delete = 4, FileShare::Inheritable = 16
}
 Specifies what kind of access other FileStream objects can have to a file being opened. More...
 
enum  SearchOption { SearchOption::AllDirectories, SearchOption::TopDirectoryOnly }
 
enum  SeekOrigin { SeekOrigin::Begin = 0, SeekOrigin::Current, SeekOrigin::End }
 

Typedef Documentation

◆ BinaryWriterPtr

An alias for a shared pointer to this class.

Enumeration Type Documentation

◆ FileAccess

Specifies the type of access when opening the file.

Enumerator
Read 

Read-only access.

Write 

Write-only access.

ReadWrite 

Read and write access.

◆ FileAttributes

Represents attributes of a directory or a file.

Enumerator
Archive 

The filesystem entity is a candidate for removal or backup.

Compressed 

The filesystem entity is compressed.

Device 

Not used.

Directory 

The filesystem entity is a directory.

Encrypted 

The filesystem entity is encrypted.

Hidden 

The filesystem entity is hidden.

IntegrityStream 

The filesystem entity contains data integrity support.

Normal 

The filesystem entity is a file that has no special attributes.

NotContentIndexed 

The filesystem entity will not be indexed by the content indexing service.

NoScrubData 

The filesystem entity is not included in the data integrity scan.

Offline 

The filesystem entity is offline and its data is not immediately available.

ReadOnly 

The filesystem entity is read-only.

ReparsePoint 

The filesystem entity is a file that contains a reparse point.

SparseFile 

The filesystem entity is a sparse file.

System 

The filesystem entity is a system file.

Temporary 

The filesystem entity is a temporary file.

Invalid 

Invalid value.

◆ FileMode

enum System::IO::FileMode
strong

Specifies how a file should be opened.

Enumerator
CreateNew 

Create a new file. If the file already exists, an exception is thrown.

Create 

Create a new file. If the file already exists, it is overwritten.

Open 

Open an existing file. If the file does not exist, an exception is thrown.

OpenOrCreate 

Open an existing file or create a new one if it does not exist.

Truncate 

Open an existing file and truncate it so that it is empty. If the file does not exist, an exception is thrown.

Append 

Open an existing file and seek to the end of it or create a new one if it does not exist.

◆ FileOptions

Represents advanced options for creating FileStream object.

Enumerator
None 

No additional options.

Encrypted 

The file is encrypted.

DeleteOnClose 

The file should be automatically deleted when it is not in use anymore.

SequentialScan 

The file shoud be accesses sequentially.

RandomAccess 

The file is accessed randomly.

Asynchronous 

The file can be used for asynchronous I/O operations.

WriteThrough 

All writes should go directly to the disk bypassing any intermediate cache.

◆ FileShare

enum System::IO::FileShare
strong

Specifies what kind of access other FileStream objects can have to a file being opened.

Enumerator
None 

No access.

Read 

Read-only access.

Write 

Write-only access.

ReadWrite 

Read and Write access.

Delete 

The file can be deleted.

Inheritable 

NOT SUPPORTED.

◆ SearchOption

Specifies a search should be performed only in the current directory, or in the current directory and all its subdirectories.

Enumerator
AllDirectories 

Search in the current directory and all its subdirectories.

TopDirectoryOnly 

Search in the current directory only.

◆ SeekOrigin

Specifies the reference position in the stream relative to which the position to seek to is specified.

Enumerator
Begin 

Beginning of the stream.

Current 

Current stream position.

End 

End of the stream.