Skip to content

File IO

Mario Gutierrez edited this page Jan 7, 2017 · 4 revisions

System.IO contains many classes for file I/O.

  • BinaryReader/BinaryWriter - store and retrieve primitive data types as a binary value.
  • BufferedStream - provides temporary storage for a stream of bytes that you can later commit to disk.
  • Directory/DirectoryInfo- manipulate a machine's directory structure.Directoryexposes functionality with _static_ members, while theDirectoryInfo` type exposes similar functionality from a valid object reference.
  • DriveInfo - detailed information about system drives.
  • File
  • FileInfo
  • FileStream
  • FileSystemWatcher - monitor modification of files in a specified directory.
  • MemoryStream - random access to data stored in memory rather than in a physical file.
  • Path - performs operations on string types that contain file path information in a platform independent manner.
  • StreamWriter/StreamReader - store and retrieve textual information to and from a file. Does not support random access.
  • StringWriter/StringReader - like StreamWriter/StreamReader, but with an underlying buffer rather than physical file.

Clone this wiki locally