DiscUtils.Core Interprets Apple Partition Map structures that partition a disk. Initializes a new instance of the PartitionMap class. Stream containing the contents of a disk. Gets the GUID of the disk, always returns Guid.Empty. Gets the partitions present on the disk. Creates a new partition that encompasses the entire disk. The partition type. Whether the partition is active (bootable). The index of the partition. The partition table must be empty before this method is called, otherwise IOException is thrown. Creates a new partition with a target size. The target size (in bytes). The partition type. Whether the partition is active (bootable). The index of the new partition. Creates a new aligned partition that encompasses the entire disk. The partition type. Whether the partition is active (bootable). The alignment (in byte). The index of the partition. The partition table must be empty before this method is called, otherwise IOException is thrown. Traditionally partitions were aligned to the physical structure of the underlying disk, however with modern storage greater efficiency is acheived by aligning partitions on large values that are a power of two. Creates a new aligned partition with a target size. The target size (in bytes). The partition type. Whether the partition is active (bootable). The alignment (in byte). The index of the new partition. Traditionally partitions were aligned to the physical structure of the underlying disk, however with modern storage greater efficiency is achieved by aligning partitions on large values that are a power of two. Deletes a partition at a given index. The index of the partition. Minimal tar file format implementation. Initializes a new instance of the TarFile class. The Tar file. Tries to open a file contained in the archive, if it exists. The path to the file within the archive. A stream containing the file contents, or null. true if the file could be opened, else false. Open a file contained in the archive. The path to the file within the archive. A stream containing the file contents. Thrown if the file is not found. Determines if a given file exists in the archive. The file path to test. true if the file is present, else false. Determines if a given directory exists in the archive. The file path to test. true if the directory is present, else false. Builder to create UNIX Tar archive files. Initializes a new instance of the class. Add a file to the tar archive. The name of the file. The file data. Add a file to the tar archive. The name of the file. The file data. The access mode of the file. The uid of the owner. The gid of the owner. The modification time for the file. Add a file to the tar archive. The name of the file. The file data. Add a file to the tar archive. The name of the file. The file data. The access mode of the file. The uid of the owner. The gid of the owner. The modification time for the file. Class whose instances represent a CHS (Cylinder, Head, Sector) address on a disk. Instances of this class are immutable. The address of the first sector on any disk. Initializes a new instance of the ChsAddress class. The number of cylinders of the disk. The number of heads (aka platters) of the disk. The number of sectors per track/cylinder of the disk. Gets the cylinder number (zero-based). Gets the head (zero-based). Gets the sector number (one-based). Determines if this object is equivalent to another. The object to test against. true if the is equivalent, else false. Calculates the hash code for this object. The hash code. Gets a string representation of this object, in the form (C/H/S). The string representation. Class that identifies the role of each cluster in a file system. Gets the role of a cluster within the file system. The cluster to inspect. The clusters role (or roles). Converts a cluster to a list of file names. The cluster to inspect. A list of paths that map to the cluster. A list is returned because on file systems with the notion of hard links, a cluster may correspond to multiple directory entries. Enumeration of possible cluster roles. A cluster may be in more than one role. Unknown, or unspecified role. Cluster is free. Cluster is in use by a normal file. Cluster is in use by a system file. This isn't a file marked with the 'system' attribute, rather files that form part of the file system namespace but also form part of the file system meta-data. Cluster is in use for meta-data. Cluster contains the boot region. Cluster is marked bad. Implementation of the Adler-32 checksum algorithm. Initializes a new instance of the Adler32 class. Gets the checksum of all data processed so far. Provides data that should be checksummed. Buffer containing the data to checksum. Offset of the first byte to checksum. The number of bytes to checksum. Call this method repeatedly until all checksummed data has been processed. Converts a byte stream into a bit stream. Base class for bit streams. The rules for conversion of a byte stream to a bit stream vary between implementations. Gets the maximum number of bits that can be peeked on the stream. Reads bits from the stream. The number of bits to read. The bits as a UInt32. Queries data from the stream. The number of bits to query. The bits as a UInt32. This method does not consume the bits (i.e. move the file pointer). Consumes bits from the stream without returning them. The number of bits to consume. Base class for block compression algorithms. Gets or sets the block size parameter to the algorithm. Some algorithms may use this to control both compression and decompression, others may only use it to control compression. Some may ignore it entirely. Compresses some data. The uncompressed input. Offset of the input data in source. The amount of uncompressed data. The destination for the output compressed data. Offset for the output data in compressed. The maximum size of the compressed data on input, and the actual size on output. Indication of success, or indication the data could not compress into the requested space. Decompresses some data. The compressed input. Offset of the input data in source. The amount of compressed data. The destination for the output decompressed data. Offset for the output data in decompressed. The amount of decompressed data. Represents scheme used by BZip2 where multiple Huffman trees are used as a virtual Huffman tree, with a logical selector every 50 bits in the bit stream. Implementation of a BZip2 decoder. Initializes a new instance of the BZip2DecoderStream class. The compressed input stream. Whether ownership of stream passes to the new instance. Gets an indication of whether read access is permitted. Gets an indication of whether seeking is permitted. Gets an indication of whether write access is permitted. Gets the length of the stream (the capacity of the underlying buffer). Gets and sets the current position within the stream. Flushes all data to the underlying storage. Reads a number of bytes from the stream. The destination buffer. The start offset within the destination buffer. The number of bytes to read. The number of bytes read. Changes the current stream position. The origin-relative stream position. The origin for the stream position. The new stream position. Sets the length of the stream (the underlying buffer's capacity). The new length of the stream. Writes a buffer to the stream. The buffer to write. The starting offset within buffer. The number of bytes to write. Releases underlying resources. Whether this method is called from Dispose. Possible results of attempting to compress data. A compression routine may return Compressed, even if the data was 'all zeros' or increased in size. The AllZeros and Incompressible values are for algorithms that include special detection for these cases. The data compressed succesfully. The data was all-zero's. The data was incompressible (could not fit into destination buffer). A canonical Huffman tree implementation. A lookup table is created that will take any bit sequence (max tree depth in length), indicating the output symbol. In WIM files, in practice, no chunk exceeds 32768 bytes in length, so we often end up generating a bigger lookup table than the data it's encoding. This makes for exceptionally fast symbol lookups O(1), but is inefficient overall. Implementation of the Zlib compression algorithm. Only decompression is currently implemented. Initializes a new instance of the ZlibStream class. The stream to compress of decompress. Whether to compress or decompress. Whether closing this stream should leave stream open. Gets whether the stream can be read. Gets whether the stream pointer can be changed. Gets whether the stream can be written to. Gets the length of the stream. Gets and sets the stream position. Closes the stream. Flushes the stream. Reads data from the stream. The buffer to populate. The first byte to write. The number of bytes requested. The number of bytes read. Seeks to a new position. Relative position to seek to. The origin of the seek. The new position. Changes the length of the stream. The new desired length of the stream. Writes data to the stream. Buffer containing the data to write. Offset of the first byte to write. Number of bytes to write. Provides information about a directory on a disc. This class allows navigation of the disc directory/file hierarchy. Initializes a new instance of the DiscDirectoryInfo class. The file system the directory info relates to. The path within the file system of the directory. Gets a value indicating whether the directory exists. Gets the full path of the directory. Creates a directory. Deletes a directory, even if it's not empty. Deletes a directory, with the caller choosing whether to recurse. true to delete all child node, false to fail if the directory is not empty. Moves a directory and it's contents to a new path. The destination directory name. Gets all child directories. An array of child directories. Gets all child directories matching a search pattern. The search pattern. An array of child directories, or empty if none match. The search pattern can include the wildcards * (matching 0 or more characters) and ? (matching 1 character). Gets all descendant directories matching a search pattern. The search pattern. Whether to search just this directory, or all children. An array of descendant directories, or empty if none match. The search pattern can include the wildcards * (matching 0 or more characters) and ? (matching 1 character). The option parameter determines whether only immediate children, or all children are returned. Gets all files. An array of files. Gets all files matching a search pattern. The search pattern. An array of files, or empty if none match. The search pattern can include the wildcards * (matching 0 or more characters) and ? (matching 1 character). Gets all descendant files matching a search pattern. The search pattern. Whether to search just this directory, or all children. An array of descendant files, or empty if none match. The search pattern can include the wildcards * (matching 0 or more characters) and ? (matching 1 character). The option parameter determines whether only immediate children, or all children are returned. Gets all files and directories in this directory. An array of files and directories. Gets all files and directories in this directory. The search pattern. An array of files and directories. The search pattern can include the wildcards * (matching 0 or more characters) and ? (matching 1 character). Provides information about a file on a disc. Gets an instance of the parent directory. Gets a string representing the directory's full path. Gets a value indicating whether the file exists. Gets or sets a value indicating whether the file is read-only. Gets the length of the current file in bytes. Deletes a file. Creates a that appends text to the file represented by this . The newly created writer. Copies an existing file to a new file. The destination file. Copies an existing file to a new file, allowing overwriting of an existing file. The destination file. Whether to permit over-writing of an existing file. Creates a new file for reading and writing. The newly created stream. Creates a new that writes a new text file. A new stream writer that can write to the file contents. Moves a file to a new location. The new name of the file. Opens the current file. The file mode for the created stream. The newly created stream. Read-only file systems only support FileMode.Open. Opens the current file. The file mode for the created stream. The access permissions for the created stream. The newly created stream. Read-only file systems only support FileMode.Open and FileAccess.Read. Opens an existing file for read-only access. The newly created stream. Opens an existing file for reading as UTF-8 text. The newly created reader. Opens a file for writing. The newly created stream. Provides the base class for all file systems. Initializes a new instance of the DiscFileSystem class. Initializes a new instance of the DiscFileSystem class. The options instance to use for this file system instance. Finalizes an instance of the DiscFileSystem class. Gets the file system options, which can be modified. Gets a friendly description of the file system type. Gets a value indicating whether the file system is read-only or read-write. true if the file system is read-write. Gets the root directory of the file system. Gets the volume label. Gets a value indicating whether the file system is thread-safe. Copies an existing file to a new file. The source file. The destination file. Copies an existing file to a new file, allowing overwriting of an existing file. The source file. The destination file. Whether to permit over-writing of an existing file. Creates a directory. The path of the new directory. Deletes a directory. The path of the directory to delete. Deletes a directory, optionally with all descendants. The path of the directory to delete. Determines if the all descendants should be deleted. Deletes a file. The path of the file to delete. Indicates if a directory exists. The path to test. true if the directory exists. Indicates if a file exists. The path to test. true if the file exists. Indicates if a file or directory exists. The path to test. true if the file or directory exists. Gets the names of subdirectories in a specified directory. The path to search. Array of directories. Gets the names of subdirectories in a specified directory matching a specified search pattern. The path to search. The search string to match against. Array of directories matching the search pattern. Gets the names of subdirectories in a specified directory matching a specified search pattern, using a value to determine whether to search subdirectories. The path to search. The search string to match against. Indicates whether to search subdirectories. Array of directories matching the search pattern. Gets the names of files in a specified directory. The path to search. Array of files. Gets the names of files in a specified directory. The path to search. The search string to match against. Array of files matching the search pattern. Gets the names of files in a specified directory matching a specified search pattern, using a value to determine whether to search subdirectories. The path to search. The search string to match against. Indicates whether to search subdirectories. Array of files matching the search pattern. Gets the names of all files and subdirectories in a specified directory. The path to search. Array of files and subdirectories matching the search pattern. Gets the names of files and subdirectories in a specified directory matching a specified search pattern. The path to search. The search string to match against. Array of files and subdirectories matching the search pattern. Moves a directory. The directory to move. The target directory name. Moves a file. The file to move. The target file name. Moves a file, allowing an existing file to be overwritten. The file to move. The target file name. Whether to permit a destination file to be overwritten. Opens the specified file. The full path of the file to open. The file mode for the created stream. The new stream. Opens the specified file. The full path of the file to open. The file mode for the created stream. The access permissions for the created stream. The new stream. Gets the attributes of a file or directory. The file or directory to inspect. The attributes of the file or directory. Sets the attributes of a file or directory. The file or directory to change. The new attributes of the file or directory. Gets the creation time (in local time) of a file or directory. The path of the file or directory. The creation time. Sets the creation time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the creation time (in UTC) of a file or directory. The path of the file or directory. The creation time. Sets the creation time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the last access time (in local time) of a file or directory. The path of the file or directory. The last access time. Sets the last access time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the last access time (in UTC) of a file or directory. The path of the file or directory. The last access time. Sets the last access time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the last modification time (in local time) of a file or directory. The path of the file or directory. The last write time. Sets the last modification time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the last modification time (in UTC) of a file or directory. The path of the file or directory. The last write time. Sets the last modification time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the length of a file. The path to the file. The length in bytes. Gets an object representing a possible file. The file path. The representing object. The file does not need to exist. Gets an object representing a possible directory. The directory path. The representing object. The directory does not need to exist. Gets an object representing a possible file system object (file or directory). The file system path. The representing object. The file system object does not need to exist. Reads the boot code of the file system into a byte array. The boot code, or null if not available. Size of the Filesystem in bytes Used space of the Filesystem in bytes Available space of the Filesystem in bytes Disposes of this instance, releasing all resources. Disposes of this instance. The value true if Disposing. Base class for objects that validate file system integrity. Instances of this class do not offer the ability to fix/correct file system issues, just to perform a limited number of checks on integrity of the file system. Checks the integrity of a file system held in a stream. A report on issues found. The amount of detail to report. true if the file system appears valid, else false. Provides the base class for both and objects. Gets or sets the of the current object. Gets or sets the creation time (in local time) of the current object. Gets or sets the creation time (in UTC) of the current object. Gets a value indicating whether the file system object exists. Gets the extension part of the file or directory name. Gets the file system the referenced file or directory exists on. Gets the full path of the file or directory. Gets or sets the last time (in local time) the file or directory was accessed. Read-only file systems will never update this value, it will remain at a fixed value. Gets or sets the last time (in UTC) the file or directory was accessed. Read-only file systems will never update this value, it will remain at a fixed value. Gets or sets the last time (in local time) the file or directory was written to. Gets or sets the last time (in UTC) the file or directory was written to. Gets the name of the file or directory. Gets the of the directory containing the current object. Gets the path to the referenced file. Deletes a file or directory. Indicates if is equivalent to this object. The object to compare. true if is equivalent, else false. Gets the hash code for this object. The hash code. Common file system options. Not all options are honoured by all file systems. Gets or sets the random number generator the file system should use. This option is normally null, which is fine for most purposes. Use this option when you need to finely control the filesystem for reproducibility of behaviour (for example in a test harness). Base class for all disk image builders. Gets or sets the geometry of this disk, as reported by the BIOS, will be implied from the content stream if not set. Gets or sets the content for this disk, implying the size of the disk. Gets or sets the adapter type for created virtual disk, for file formats that encode this information. Gets or sets the geometry of this disk, will be implied from the content stream if not set. Gets a value indicating whether this file format preserves BIOS geometry information. Gets an instance that constructs the specified type (and variant) of virtual disk image. The type of image to build (VHD, VMDK, etc). The variant type (differencing/dynamic, fixed/static, etc). The builder instance. Initiates the construction of the disk image. The base name for the disk images. A set of one or more logical files that constitute the disk image. The first file is the 'primary' file that is normally attached to VMs. The supplied baseName is the start of the file name, with no file extension. The set of file specifications will indicate the actual name corresponding to each logical file that comprises the disk image. For example, given a base name 'foo', the files 'foo.vmdk' and 'foo-flat.vmdk' could be returned. Describes a particular file that is a constituent part of a virtual disk. Gets name of the file. Gets the object that provides access to the file's content. A stream object that contains the file's content. Base class holding information about a file system. File system implementations derive from this class, to provide information about the file system. Gets a one-line description of the file system. Gets the name of the file system. Opens a volume using the file system. The volume to access. A file system instance. Opens a stream using the file system. The stream to access. A file system instance. Opens a volume using the file system. The volume to access. Parameters for the file system. A file system instance. Opens a stream using the file system. The stream to access. Parameters for the file system. A file system instance. Gets the name of the file system. The file system name. FileSystemManager determines which file systems are present on a volume. The static detection methods detect default file systems. To plug in additional file systems, create an instance of this class and call RegisterFileSystems. Initializes a new instance of the FileSystemManager class. Registers new file systems with an instance of this class. The detector for the new file systems. Registers new file systems detected in an assembly. The assembly to inspect. To be detected, the VfsFileSystemFactory instances must be marked with the VfsFileSystemFactoryAttribute> attribute. Detect which file systems are present on a volume. The volume to inspect. The list of file systems detected. Detect which file systems are present in a stream. The stream to inspect. The list of file systems detected. Class with generic file system parameters. Note - not all parameters apply to all types of file system. Gets or sets the character encoding for file names, or null for default. Some file systems, such as FAT, don't specify a particular character set for file names. This parameter determines the character set that will be used for such file systems. Gets or sets the algorithm to convert file system time to UTC. Some file system, such as FAT, don't have a defined way to convert from file system time (local time where the file system is authored) to UTC time. This parameter determines the algorithm to use. The supported Floppy Disk logical formats. 720KiB capacity disk. 1440KiB capacity disk. 2880KiB capacity disk. Well known hard disk adaptor types. IDE adaptor. SCSI adaptor. Class whose instances represent disk geometries. Instances of this class are immutable. Initializes a new instance of the Geometry class. The default 512 bytes per sector is assumed. The number of cylinders of the disk. The number of heads (aka platters) of the disk. The number of sectors per track/cylinder of the disk. Initializes a new instance of the Geometry class. The number of cylinders of the disk. The number of heads (aka platters) of the disk. The number of sectors per track/cylinder of the disk. The number of bytes per sector of the disk. Initializes a new instance of the Geometry class. The total capacity of the disk. The number of heads (aka platters) of the disk. The number of sectors per track/cylinder of the disk. The number of bytes per sector of the disk. Gets the number of bytes in each sector. Gets the total capacity of the disk (in bytes). Gets the number of cylinders. Gets the number of heads (aka platters). Gets a value indicating whether the Geometry is representable both by the BIOS and by IDE. Gets a value indicating whether the Geometry is consistent with the values a BIOS can support. Gets a value indicating whether the Geometry is consistent with the values IDE can represent. Gets the address of the last sector on the disk. Gets a null geometry, which has 512-byte sectors but zero sectors, tracks or cylinders. Gets the number of sectors per track. Gets the total size of the disk (in sectors). Gets the total size of the disk (in sectors). Gets the 'Large' BIOS geometry for a disk, given it's physical geometry. The physical (aka IDE) geometry of the disk. The geometry a BIOS using the 'Large' method for calculating disk geometry will indicate for the disk. Gets the 'LBA Assisted' BIOS geometry for a disk, given it's capacity. The capacity of the disk. The geometry a BIOS using the 'LBA Assisted' method for calculating disk geometry will indicate for the disk. Converts a geometry into one that is BIOS-safe, if not already. The geometry to make BIOS-safe. The capacity of the disk. The new geometry. This method returns the LBA-Assisted geometry if the given geometry isn't BIOS-safe. Calculates a sensible disk geometry for a disk capacity using the VHD algorithm (errs under). The desired capacity of the disk. The appropriate disk geometry. The geometry returned tends to produce a disk with less capacity than requested (an exact capacity is not always possible). The geometry returned is the IDE (aka Physical) geometry of the disk, not necessarily the geometry used by the BIOS. Calculates a sensible disk geometry for a disk capacity using the VHD algorithm (errs under). The desired capacity of the disk. The logical sector size of the disk. The appropriate disk geometry. The geometry returned tends to produce a disk with less capacity than requested (an exact capacity is not always possible). The geometry returned is the IDE (aka Physical) geometry of the disk, not necessarily the geometry used by the BIOS. Converts a CHS (Cylinder,Head,Sector) address to a LBA (Logical Block Address). The CHS address to convert. The Logical Block Address (in sectors). Converts a CHS (Cylinder,Head,Sector) address to a LBA (Logical Block Address). The cylinder of the address. The head of the address. The sector of the address. The Logical Block Address (in sectors). Converts a LBA (Logical Block Address) to a CHS (Cylinder, Head, Sector) address. The logical block address (in sectors). The address in CHS form. Translates an IDE (aka Physical) geometry to a BIOS (aka Logical) geometry. The translation to perform. The translated disk geometry. Translates an IDE (aka Physical) geometry to a BIOS (aka Logical) geometry. The capacity of the disk, required if the geometry is an approximation on the actual disk size. The translation to perform. The translated disk geometry. Determines if this object is equivalent to another. The object to test against. true if the is equivalent, else false. Calculates the hash code for this object. The hash code. Gets a string representation of this object, in the form (C/H/S). The string representation. Delegate for calculating a disk geometry from a capacity. The disk capacity to convert. The appropriate geometry for the disk. Enumeration of standard BIOS disk geometry translation methods. Apply no translation. Automatic, based on the physical geometry select the most appropriate translation. LBA assisted translation, based on just the disk capacity. Bit-shifting translation, based on the physical geometry of the disk. Base class for all file systems based on a cluster model. Gets the size (in bytes) of each cluster. Gets the total number of clusters managed by the file system. Converts a cluster (index) into an absolute byte position in the underlying stream. The cluster to convert. The corresponding absolute byte position. Converts an absolute byte position in the underlying stream to a cluster (index). The byte position to convert. The cluster containing the specified byte. Converts a file name to the list of clusters occupied by the file's data. The path to inspect. The clusters. Note that in some file systems, small files may not have dedicated clusters. Only dedicated clusters will be returned. Converts a file name to the extents containing its data. The path to inspect. The file extents, as absolute byte positions in the underlying stream. Use this method with caution - not all file systems will store all bytes directly in extents. Files may be compressed, sparse or encrypted. This method merely indicates where file data is stored, not what's stored. Gets an object that can convert between clusters and files. The cluster map. Interface exposed by objects that can provide a structured trace of their content. Writes a diagnostic report about the state of the object to a writer. The writer to send the report to. The prefix to place at the start of each line. Common interface for all file systems. Gets a value indicating whether the file system is read-only or read-write. true if the file system is read-write. Gets a value indicating whether the file system is thread-safe. Gets the root directory of the file system. Copies an existing file to a new file. The source file. The destination file. Copies an existing file to a new file, allowing overwriting of an existing file. The source file. The destination file. Whether to permit over-writing of an existing file. Creates a directory. The path of the new directory. Deletes a directory. The path of the directory to delete. Deletes a directory, optionally with all descendants. The path of the directory to delete. Determines if the all descendants should be deleted. Deletes a file. The path of the file to delete. Indicates if a directory exists. The path to test. true if the directory exists. Indicates if a file exists. The path to test. true if the file exists. Indicates if a file or directory exists. The path to test. true if the file or directory exists. Gets the names of subdirectories in a specified directory. The path to search. Array of directories. Gets the names of subdirectories in a specified directory matching a specified search pattern. The path to search. The search string to match against. Array of directories matching the search pattern. Gets the names of subdirectories in a specified directory matching a specified search pattern, using a value to determine whether to search subdirectories. The path to search. The search string to match against. Indicates whether to search subdirectories. Array of directories matching the search pattern. Gets the names of files in a specified directory. The path to search. Array of files. Gets the names of files in a specified directory. The path to search. The search string to match against. Array of files matching the search pattern. Gets the names of files in a specified directory matching a specified search pattern, using a value to determine whether to search subdirectories. The path to search. The search string to match against. Indicates whether to search subdirectories. Array of files matching the search pattern. Gets the names of all files and subdirectories in a specified directory. The path to search. Array of files and subdirectories matching the search pattern. Gets the names of files and subdirectories in a specified directory matching a specified search pattern. The path to search. The search string to match against. Array of files and subdirectories matching the search pattern. Moves a directory. The directory to move. The target directory name. Moves a file. The file to move. The target file name. Moves a file, allowing an existing file to be overwritten. The file to move. The target file name. Whether to permit a destination file to be overwritten. Opens the specified file. The full path of the file to open. The file mode for the created stream. The new stream. Opens the specified file. The full path of the file to open. The file mode for the created stream. The access permissions for the created stream. The new stream. Gets the attributes of a file or directory. The file or directory to inspect. The attributes of the file or directory. Sets the attributes of a file or directory. The file or directory to change. The new attributes of the file or directory. Gets the creation time (in local time) of a file or directory. The path of the file or directory. The creation time. Sets the creation time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the creation time (in UTC) of a file or directory. The path of the file or directory. The creation time. Sets the creation time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the last access time (in local time) of a file or directory. The path of the file or directory. The last access time. Sets the last access time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the last access time (in UTC) of a file or directory. The path of the file or directory. The last access time. Sets the last access time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the last modification time (in local time) of a file or directory. The path of the file or directory. The last write time. Sets the last modification time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the last modification time (in UTC) of a file or directory. The path of the file or directory. The last write time. Sets the last modification time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the length of a file. The path to the file. The length in bytes. Gets an object representing a possible file. The file path. The representing object. The file does not need to exist. Gets an object representing a possible directory. The directory path. The representing object. The directory does not need to exist. Gets an object representing a possible file system object (file or directory). The file system path. The representing object. The file system object does not need to exist. Reads the boot code of the file system into a byte array. The boot code, or null if not available. Size of the Filesystem in bytes Used space of the Filesystem in bytes Available space of the Filesystem in bytes Used in Ethernet, PKZIP, BZIP2, Gzip, PNG, etc. (aka CRC32). Used in iSCSI, SCTP, Btrfs, Vhdx. (aka CRC32C). Unknown usage. (aka CRC32K). Used in AIXM. (aka CRC32Q). Calculates CRC32 of buffers. Calculates CRC32 of buffers. Caches objects. The type of the object key. The type of the objects to cache. Can be use for two purposes - to ensure there is only one instance of a given object, and to prevent the need to recreate objects that are expensive to create. Converts between two arrays. The type of the elements of the source array. The type of the elements of the destination array. The source array. The function to map from source type to destination type. The resultant array. Converts between two arrays. The type of the elements of the source array. The type of the elements of the destination array. The source array. The function to map from source type to destination type. The resultant array. Filters a collection into a new collection. The type of the new collection. The type of the collection entries. The collection to filter. The predicate to select which entries are carried over. The new collection, containing all entries where the predicate returns true. Indicates if two ranges overlap. The type of the ordinals. The lowest ordinal of the first range (inclusive). The highest ordinal of the first range (exclusive). The lowest ordinal of the second range (inclusive). The highest ordinal of the second range (exclusive). true if the ranges overlap, else false. Extracts the directory part of a path. The path to process. The directory part. Extracts the file part of a path. The path to process. The file part of the path. Combines two paths. The first part of the path. The second part of the path. The combined path. Resolves a relative path into an absolute one. The base path to resolve from. The relative path. The absolute path. If no is specified then relativePath is returned as-is. If contains more '..' characters than the base path contains levels of directory, the resultant string be the root drive followed by the file name. If no the basePath starts with '\' (no drive specified) then the returned path will also start with '\'. For example: (\TEMP\Foo.txt, ..\..\Bar.txt) gives (\Bar.txt). Indicates if a file name matches the 8.3 pattern. The name to test. true if the name is 8.3, otherwise false. Converts a 'standard' wildcard file/path specification into a regular expression. The wildcard pattern to convert. The resultant regular expression. The wildcard * (star) matches zero or more characters (including '.'), and ? (question mark) matches precisely one character (except '.'). Exception thrown when some invalid file system data is found, indicating probably corruption. Initializes a new instance of the InvalidFileSystemException class. Initializes a new instance of the InvalidFileSystemException class. The exception message. Initializes a new instance of the InvalidFileSystemException class. The exception message. The inner exception. Initializes a new instance of the InvalidFileSystemException class. The serialization info. The streaming context. Provides the base class for all file systems that support Unix semantics. Retrieves Unix-specific information about a file or directory. Path to the file or directory. Information about the owner, group, permissions and type of the file or directory. Provides the base class for all file systems that support Windows semantics. Gets the security descriptor associated with the file or directory. The file or directory to inspect. The security descriptor. Sets the security descriptor associated with the file or directory. The file or directory to change. The new security descriptor. Gets the reparse point data associated with a file or directory. The file to query. The reparse point information. Sets the reparse point data on a file or directory. The file to set the reparse point on. The new reparse point. Removes a reparse point from a file or directory, without deleting the file or directory. The path to the file or directory to remove the reparse point from. Gets the short name for a given path. The path to convert. The short name. This method only gets the short name for the final part of the path, to convert a complete path, call this method repeatedly, once for each path segment. If there is no short name for the given path,null is returned. Sets the short name for a given file or directory. The full path to the file or directory to change. The shortName, which should not include a path. Gets the standard file information for a file. The full path to the file or directory to query. The standard file information. Sets the standard file information for a file. The full path to the file or directory to query. The standard file information. Gets the names of the alternate data streams for a file. The path to the file. The list of alternate data streams (or empty, if none). To access the contents of the alternate streams, use OpenFile(path + ":" + name, ...). Gets the file id for a given path. The path to get the id of. The file id, or -1. The returned file id uniquely identifies the file, and is shared by all hard links to the same file. The value -1 indicates no unique identifier is available, and so it can be assumed the file has no hard links. Indicates whether the file is known by other names. The file to inspect. true if the file has other names, else false. A class that understands Windows LDM structures, mapping physical volumes to logical volumes. Initializes a new instance of the DynamicDiskManager class. The initial set of disks to manage. Writes a diagnostic report about the state of the disk manager. The writer to send the report to. The prefix to place at the start of each line. Determines if a physical volume contains LDM data. The volume to inspect. true if the physical volume contains LDM data, else false. Determines if a disk is 'dynamic' (i.e. contains LDM volumes). The disk to inspect. true if the disk contains LDM volumes, else false. Adds a new disk to be managed. The disk to manage. Gets the logical volumes held across the set of managed disks. An array of logical volumes. Information about a logical disk volume, which may be backed by one or more physical volumes. Gets the disk geometry of the underlying storage medium (as used in BIOS calls), may be null. Gets the one-byte BIOS type for this volume, which indicates the content. The stable identity for this logical volume. The stability of the identity depends the disk structure. In some cases the identity may include a simple index, when no other information is available. Best practice is to add disks to the Volume Manager in a stable order, if the stability of this identity is paramount. Gets the length of the volume (in bytes). Gets the disk geometry of the underlying storage medium, if any (may be Geometry.Null). Gets the offset of this volume in the underlying storage medium, if any (may be Zero). Gets the status of the logical volume, indicating volume health. Gets the underlying physical volume info Opens a stream with access to the content of the logical volume. The volume's content as a stream. Enumeration of the health status of a logical volume. The volume is healthy and fully functional. The volume is completely accessible, but at degraded redundancy. The volume is wholey, or partly, inaccessible. Provides an implementation for OS-mounted file systems. Initializes a new instance of the NativeFileSystem class. The 'root' directory of the new instance. Only permit 'read' activities. Gets the base path used to create the file system. Indicates whether the file system is read-only or read-write. true if the file system is read-write. Provides a friendly description of the file system type. Gets a value indicating whether the file system is thread-safe. The Native File System is thread safe. Gets the root directory of the file system. Gets the volume label. Copies an existing file to a new file. The source file. The destination file. Copies an existing file to a new file, allowing overwriting of an existing file. The source file. The destination file. Whether to permit over-writing of an existing file. Creates a directory. The path of the new directory. Deletes a directory. The path of the directory to delete. Deletes a directory, optionally with all descendants. The path of the directory to delete. Determines if the all descendants should be deleted. Deletes a file. The path of the file to delete. Indicates if a directory exists. The path to test. true if the directory exists. Indicates if a file exists. The path to test. true if the file exists. Indicates if a file or directory exists. The path to test. true if the file or directory exists. Gets the names of subdirectories in a specified directory. The path to search. Array of directories. Gets the names of subdirectories in a specified directory matching a specified search pattern. The path to search. The search string to match against. Array of directories matching the search pattern. Gets the names of subdirectories in a specified directory matching a specified search pattern, using a value to determine whether to search subdirectories. The path to search. The search string to match against. Indicates whether to search subdirectories. Array of directories matching the search pattern. Gets the names of files in a specified directory. The path to search. Array of files. Gets the names of files in a specified directory. The path to search. The search string to match against. Array of files matching the search pattern. Gets the names of files in a specified directory matching a specified search pattern, using a value to determine whether to search subdirectories. The path to search. The search string to match against. Indicates whether to search subdirectories. Array of files matching the search pattern. Gets the names of all files and subdirectories in a specified directory. The path to search. Array of files and subdirectories matching the search pattern. Gets the names of files and subdirectories in a specified directory matching a specified search pattern. The path to search. The search string to match against. Array of files and subdirectories matching the search pattern. Moves a directory. The directory to move. The target directory name. Moves a file. The file to move. The target file name. Moves a file, allowing an existing file to be overwritten. The file to move. The target file name. Whether to permit a destination file to be overwritten. Opens the specified file. The full path of the file to open. The file mode for the created stream. The new stream. Opens the specified file. The full path of the file to open. The file mode for the created stream. The access permissions for the created stream. The new stream. Gets the attributes of a file or directory. The file or directory to inspect. The attributes of the file or directory. Sets the attributes of a file or directory. The file or directory to change. The new attributes of the file or directory. Gets the creation time (in local time) of a file or directory. The path of the file or directory. The creation time. Sets the creation time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the creation time (in UTC) of a file or directory. The path of the file or directory. The creation time. Sets the creation time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the last access time (in local time) of a file or directory. The path of the file or directory. The last access time. Sets the last access time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the last access time (in UTC) of a file or directory. The path of the file or directory. The last access time. Sets the last access time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the last modification time (in local time) of a file or directory. The path of the file or directory. The last write time. Sets the last modification time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the last modification time (in UTC) of a file or directory. The path of the file or directory. The last write time. Sets the last modification time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the length of a file. The path to the file. The length in bytes. Gets an object representing a possible file. The file path. The representing object. The file does not need to exist. Gets an object representing a possible directory. The directory path. The representing object. The directory does not need to exist. Gets an object representing a possible file system object (file or directory). The file system path. The representing object. The file system object does not need to exist. Size of the Filesystem in bytes Used space of the Filesystem in bytes Available space of the Filesystem in bytes Gets all of the disk ranges containing partition table data. Set of stream extents, indicated as byte offset from the start of the disk. Builds a stream with the contents of a BIOS partitioned disk. This class assembles a disk image dynamically in memory. The constructed stream will read data from the partition content streams only when a client of this class tries to read from that partition. Initializes a new instance of the BiosPartitionedDiskBuilder class. The capacity of the disk (in bytes). The BIOS geometry of the disk. Initializes a new instance of the BiosPartitionedDiskBuilder class. The capacity of the disk (in bytes). The boot sector(s) of the disk. The BIOS geometry of the disk. Initializes a new instance of the BiosPartitionedDiskBuilder class by cloning the partition structure of a source disk. The disk to clone. Gets the partition table in the disk. Sets a stream representing the content of a partition in the partition table. The index of the partition. The stream with the contents of the partition. Updates the CHS fields in partition records to reflect a new BIOS geometry. The disk's new BIOS geometry. The partitions are not relocated to a cylinder boundary, just the CHS fields are updated on the assumption the LBA fields are definitive. Provides access to partition records in a BIOS (MBR) partition table. Gets the type of the partition. Gets the end (inclusive) of the partition as a CHS address. Gets the first sector of the partion (relative to start of disk) as a Logical Block Address. Always returns .Empty. Gets a value indicating whether this partition is active (bootable). Gets a value indicating whether the partition is a primary (rather than extended) partition. Gets the last sector of the partion (relative to start of disk) as a Logical Block Address (inclusive). Gets the index of the partition in the primary partition table, or -1 if not a primary partition. Gets the start of the partition as a CHS address. Gets the type of the partition as a string. Opens a stream to access the content of the partition. The new stream. Represents a BIOS (MBR) Partition Table. Initializes a new instance of the BiosPartitionTable class. The disk containing the partition table. Initializes a new instance of the BiosPartitionTable class. The stream containing the disk data. The geometry of the disk. Gets a collection of the partitions for storing Operating System file-systems. Gets the GUID that uniquely identifies this disk, if supported (else returns null). Gets a collection of the partitions for storing Operating System file-systems. Makes a best guess at the geometry of a disk. String containing the disk image to detect the geometry from. The detected geometry. Indicates if a stream contains a valid partition table. The stream to inspect. true if the partition table is valid, else false. Creates a new partition table on a disk. The disk to initialize. An object to access the newly created partition table. Creates a new partition table on a disk containing a single partition. The disk to initialize. The partition type for the single partition. An object to access the newly created partition table. Creates a new partition table on a disk. The stream containing the disk data. The geometry of the disk. An object to access the newly created partition table. Creates a new partition that encompasses the entire disk. The partition type. Whether the partition is active (bootable). The index of the partition. The partition table must be empty before this method is called, otherwise IOException is thrown. Creates a new primary partition with a target size. The target size (in bytes). The partition type. Whether the partition is active (bootable). The index of the new partition. Creates a new aligned partition that encompasses the entire disk. The partition type. Whether the partition is active (bootable). The alignment (in bytes). The index of the partition. The partition table must be empty before this method is called, otherwise IOException is thrown. Traditionally partitions were aligned to the physical structure of the underlying disk, however with modern storage greater efficiency is acheived by aligning partitions on large values that are a power of two. Creates a new aligned partition with a target size. The target size (in bytes). The partition type. Whether the partition is active (bootable). The alignment (in bytes). The index of the new partition. Traditionally partitions were aligned to the physical structure of the underlying disk, however with modern storage greater efficiency is achieved by aligning partitions on large values that are a power of two. Deletes a partition at a given index. The index of the partition. Creates a new Primary Partition that occupies whole cylinders, for best compatibility. The first cylinder to include in the partition (inclusive). The last cylinder to include in the partition (inclusive). The BIOS (MBR) type of the new partition. Whether to mark the partition active (bootable). The index of the new partition. If the cylinder 0 is given, the first track will not be used, to reserve space for the meta-data at the start of the disk. Creates a new Primary Partition, specified by Logical Block Addresses. The LBA address of the first sector (inclusive). The LBA address of the last sector (inclusive). The BIOS (MBR) type of the new partition. Whether to mark the partition active (bootable). The index of the new partition. Sets the active partition. The index of the primary partition to mark bootable, or -1 for none. The supplied index is the index within the primary partition, see PrimaryIndex on BiosPartitionInfo. Gets all of the disk ranges containing partition table metadata. Set of stream extents, indicated as byte offset from the start of the disk. Updates the CHS fields in partition records to reflect a new BIOS geometry. The disk's new BIOS geometry. The partitions are not relocated to a cylinder boundary, just the CHS fields are updated on the assumption the LBA fields are definitive. Convenient access to well-known BIOS (MBR) Partition Types. Microsoft FAT12 (fewer than 32,680 sectors in the volume). Microsoft FAT16 (32,680–65,535 sectors or 16 MB–33 MB). Extended Partition (contains other partitions). Microsoft BIGDOS FAT16 (33 MB–4 GB). Installable File System (NTFS). Microsoft FAT32. Microsoft FAT32, accessed using Int13h BIOS LBA extensions. Microsoft BIGDOS FAT16, accessed using Int13h BIOS LBA extensions. Extended Partition (contains other partitions), accessed using Int13h BIOS LBA extensions. Windows Logical Disk Manager dynamic volume. Linux Swap. Linux Native (ext2 and friends). Linux Logical Volume Manager (LVM). GUID Partition Table (GPT) protective partition, fills entire disk. EFI System partition on an MBR disk. Provides a string representation of some known BIOS partition types. The partition type to represent as a string. The string representation. Provides access to partition records in a GUID partition table. Gets the attributes of the partition. Always returns Zero. Gets the first sector of the partion (relative to start of disk) as a Logical Block Address. Gets the type of the partition, as a GUID. Gets the unique identity of this specific partition. Gets the last sector of the partion (relative to start of disk) as a Logical Block Address (inclusive). Gets the name of the partition. Gets the type of the partition as a string. Opens a stream to access the content of the partition. The new stream. Represents a GUID Partition Table. Initializes a new instance of the GuidPartitionTable class. The disk containing the partition table. Initializes a new instance of the GuidPartitionTable class. The stream containing the disk data. The geometry of the disk. Gets the unique GPT identifier for this disk. Gets the first sector of the disk available to hold partitions. Gets the last sector of the disk available to hold partitions. Gets a collection of the partitions for storing Operating System file-systems. Creates a new partition table on a disk. The disk to initialize. An object to access the newly created partition table. Creates a new partition table on a disk. The stream containing the disk data. The geometry of the disk. An object to access the newly created partition table. Creates a new partition table on a disk containing a single partition. The disk to initialize. The partition type for the single partition. An object to access the newly created partition table. Creates a new partition that encompasses the entire disk. The partition type. Whether the partition is active (bootable). The index of the partition. The partition table must be empty before this method is called, otherwise IOException is thrown. Creates a new primary partition with a target size. The target size (in bytes). The partition type. Whether the partition is active (bootable). The index of the new partition. Creates a new aligned partition that encompasses the entire disk. The partition type. Whether the partition is active (bootable). The alignment (in bytes). The index of the partition. The partition table must be empty before this method is called, otherwise IOException is thrown. Traditionally partitions were aligned to the physical structure of the underlying disk, however with modern storage greater efficiency is acheived by aligning partitions on large values that are a power of two. Creates a new aligned partition with a target size. The target size (in bytes). The partition type. Whether the partition is active (bootable). The alignment (in bytes). The index of the new partition. Traditionally partitions were aligned to the physical structure of the underlying disk, however with modern storage greater efficiency is achieved by aligning partitions on large values that are a power of two. Creates a new GUID partition on the disk. The first sector of the partition. The last sector of the partition. The partition type. The partition attributes. The name of the partition. The index of the new partition. No checking is performed on the parameters, the caller is responsible for ensuring that the partition does not overlap other partitions. Deletes a partition at a given index. The index of the partition. Convenient access to well known GPT partition types. EFI system partition. BIOS boot partition. Microsoft reserved partition. Windows basic data partition. Linux LVM partition. Linux swap partition. Windows Logical Disk Manager metadata. Windows Logical Disk Manager data. Converts a well known partition type to a Guid. The value to convert. The GUID value. Base class representing a disk partition. The purpose of this class is to provide a minimal view of a partition, such that callers can access existing partitions without specific knowledge of the partitioning system. Gets the type of the partition, in legacy BIOS form, when available. Zero for GUID-style partitions. Gets the first sector of the partion (relative to start of disk) as a Logical Block Address. Gets the type of the partition, as a GUID, when available. .Empty for MBR-style partitions. Gets the last sector of the partion (relative to start of disk) as a Logical Block Address (inclusive). Gets the length of the partition in sectors. Gets the partition type as a 'friendly' string. Gets the physical volume type for this type of partition. Opens a stream that accesses the partition's contents. The new stream. Gets a summary of the partition information as 'first - last (type)'. A string representation of the partition information. Base class for classes which represent a disk partitioning scheme. After modifying the table, by creating or deleting a partition assume that any previously stored partition indexes of higher value are no longer valid. Re-enumerate the partitions to discover the next index-to-partition mapping. Gets the number of User partitions on the disk. Gets the GUID that uniquely identifies this disk, if supported (else returns null). Gets information about a particular User partition. The index of the partition. Information about the partition. Gets the list of partitions that contain user data (i.e. non-system / empty). Determines if a disk is partitioned with a known partitioning scheme. The content of the disk to check. true if the disk is partitioned, else false. Determines if a disk is partitioned with a known partitioning scheme. The disk to check. true if the disk is partitioned, else false. Gets all of the partition tables found on a disk. The disk to inspect. It is rare for a disk to have multiple partition tables, but theoretically possible. Gets all of the partition tables found on a disk. The content of the disk to inspect. It is rare for a disk to have multiple partition tables, but theoretically possible. Creates a new partition that encompasses the entire disk. The partition type. Whether the partition is active (bootable). The index of the partition. The partition table must be empty before this method is called, otherwise IOException is thrown. Creates a new partition with a target size. The target size (in bytes). The partition type. Whether the partition is active (bootable). The index of the new partition. Creates a new aligned partition that encompasses the entire disk. The partition type. Whether the partition is active (bootable). The alignment (in byte). The index of the partition. The partition table must be empty before this method is called, otherwise IOException is thrown. Traditionally partitions were aligned to the physical structure of the underlying disk, however with modern storage greater efficiency is acheived by aligning partitions on large values that are a power of two. Creates a new aligned partition with a target size. The target size (in bytes). The partition type. Whether the partition is active (bootable). The alignment (in byte). The index of the new partition. Traditionally partitions were aligned to the physical structure of the underlying disk, however with modern storage greater efficiency is achieved by aligning partitions on large values that are a power of two. Deletes a partition at a given index. The index of the partition. Enumeration of partition-table technology neutral partition types. Windows FAT-based partition. Windows NTFS-based partition. Linux native file system. Linux swap. Linux Logical Volume Manager (LVM). Information about a physical disk volume, which may be a partition or an entire disk. Initializes a new instance of the PhysicalVolumeInfo class. The containing disk's identity. The disk containing the partition. Information about the partition. Use this constructor to represent a (BIOS or GPT) partition. Initializes a new instance of the PhysicalVolumeInfo class. The identity of the disk. The disk itself. Use this constructor to represent an entire disk as a single volume. Gets the disk geometry of the underlying storage medium (as used in BIOS calls), may be null. Gets the one-byte BIOS type for this volume, which indicates the content. Gets the unique identity of the disk containing the volume, if known. Gets the signature of the disk containing the volume (only valid for partition-type volumes). Gets the stable identity for this physical volume. The stability of the identity depends the disk structure. In some cases the identity may include a simple index, when no other information is available. Best practice is to add disks to the Volume Manager in a stable order, if the stability of this identity is paramount. Gets the size of the volume, in bytes. Gets the underlying partition (if any). Gets the unique identity of the physical partition, if known. Gets the disk geometry of the underlying storage medium, if any (may be null). Gets the offset of this volume in the underlying storage medium, if any (may be Zero). Gets the type of the volume. Opens the volume, providing access to its contents. A stream that can be used to access the volume. Enumeration of possible types of physical volume. Unknown type. Physical volume encompasses the entire disk. Physical volume is defined by a BIOS-style partition table. Physical volume is defined by a GUID partition table. Physical volume is defined by an Apple partition map. Represents a raw disk image. This disk format is simply an uncompressed capture of all blocks on a disk. Initializes a new instance of the Disk class. The stream to read. Indicates if the new instance should control the lifetime of the stream. Initializes a new instance of the Disk class. The stream to read. Indicates if the new instance should control the lifetime of the stream. The emulated geometry of the disk. Initializes a new instance of the Disk class. The path to the disk image. Initializes a new instance of the Disk class. The path to the disk image. The access requested to the disk. Initializes a new instance of the Disk class. The contents of the disk. Gets the capacity of the disk (in bytes). Gets the content of the disk as a stream. Note the returned stream is not guaranteed to be at any particular position. The actual position will depend on the last partition table/file system activity, since all access to the disk contents pass through a single stream instance. Set the stream position before accessing the stream. Gets the type of disk represented by this object. Gets information about the type of disk. This property provides access to meta-data about the disk format, for example whether the BIOS geometry is preserved in the disk file. Gets the geometry of the disk. Gets the layers that make up the disk. Initializes a stream as an unformatted disk. The stream to initialize. Indicates if the new instance controls the lifetime of the stream. The desired capacity of the new disk. An object that accesses the stream as a disk. Initializes a stream as an unformatted disk. The stream to initialize. Indicates if the new instance controls the lifetime of the stream. The desired capacity of the new disk. The desired geometry of the new disk, or null for default. An object that accesses the stream as a disk. Initializes a stream as an unformatted floppy disk. The stream to initialize. Indicates if the new instance controls the lifetime of the stream. The type of floppy disk image to create. An object that accesses the stream as a disk. Create a new differencing disk, possibly within an existing disk. The file system to create the disk on. The path (or URI) for the disk to create. The newly created disk. Create a new differencing disk. The path (or URI) for the disk to create. The newly created disk. Disposes of underlying resources. Set to true if called within Dispose(), else false. Represents a single raw disk image file. Initializes a new instance of the DiskImageFile class. The stream to interpret. Initializes a new instance of the DiskImageFile class. The stream to interpret. Indicates if the new instance should control the lifetime of the stream. The emulated geometry of the disk. Gets the type of disk represented by this object. Gets the geometry of the file. Gets a value indicating if the layer only stores meaningful sectors. Gets a value indicating whether the file is a differencing disk. Initializes a stream as a raw disk image. The stream to initialize. Indicates if the new instance controls the lifetime of the stream. The desired capacity of the new disk. The geometry of the new disk. An object that accesses the stream as a raw disk image. Initializes a stream as an unformatted floppy disk. The stream to initialize. Indicates if the new instance controls the lifetime of the stream. The type of floppy disk image to create. An object that accesses the stream as a disk. Gets the content of this layer. The parent stream (if any). Controls ownership of the parent stream. The content as a stream. Gets the possible locations of the parent file (if any). Array of strings, empty if no parent. Disposes of underlying resources. Set to true if called within Dispose(), else false. Calculates the best guess geometry of a disk. The disk to detect the geometry of. The geometry of the disk. Calculates the best guess disk type (i.e. floppy or hard disk). The capacity of the disk. The disk type. Base class for file systems that are by their nature read-only, causes NotSupportedException to be thrown from all methods that are always invalid. Initializes a new instance of the ReadOnlyDiscFileSystem class. Initializes a new instance of the ReadOnlyDiscFileSystem class. The options instance to use for this file system instance. Indicates whether the file system is read-only or read-write. Always false. Copies a file - not supported on read-only file systems. The source file. The destination file. Whether to permit over-writing of an existing file. Creates a directory - not supported on read-only file systems. The path of the new directory. Deletes a directory - not supported on read-only file systems. The path of the directory to delete. Deletes a file - not supported on read-only file systems. The path of the file to delete. Moves a directory - not supported on read-only file systems. The directory to move. The target directory name. Moves a file - not supported on read-only file systems. The file to move. The target file name. Whether to allow an existing file to be overwritten. Opens the specified file. The full path of the file to open. The file mode for the created stream. The new stream. Sets the attributes of a file or directory - not supported on read-only file systems. The file or directory to change. The new attributes of the file or directory. Sets the creation time (in UTC) of a file or directory - not supported on read-only file systems. The path of the file or directory. The new time to set. Sets the last access time (in UTC) of a file or directory - not supported on read-only file systems. The path of the file or directory. The new time to set. Sets the last modification time (in UTC) of a file or directory - not supported on read-only file systems. The path of the file or directory. The new time to set. Represents a Reparse Point, which can be associated with a file or directory. Initializes a new instance of the ReparsePoint class. The defined reparse point tag. The reparse point's content. Gets or sets the reparse point's content. Gets or sets the defined reparse point tag. Flags for the amount of detail to include in a report. Report no information. Report informational level items. Report warning level items. Report error level items. Report all items. Event arguments for opening a file Gets or sets the filename to open Gets or sets the Gets or sets the Gets or sets the The resulting stream. If this is set to a non null value, this stream is used instead of opening the supplied returns the result from the builtin FileLocator Helps setup new DiscUtils dependencies, when loaded into target programs Registers the types provided by an assembly to all relevant DiscUtils managers Allows intercepting any file open operation Can be used to wrap the opened file for special use cases, modify the parameters for opening files, validate file names and many more. Converts a time to/from UTC. The time to convert. true to convert FAT time to UTC, false to convert UTC to FAT time. The converted time. Standard Unix-style file system permissions. No permissions. Any user execute permission. Any user write permission. Any user read permission. Any user all permissions. Group execute permission. Group write permission. Group read permission. Group all permissions. Owner execute permission. Owner write permission. Owner read permission. Owner all permissions. Sticky bit (meaning ill-defined). Set GUID on execute. Set UID on execute. Information about a file or directory common to most Unix systems. Gets or sets the device id of the referenced device (for character and block devices). Gets or sets the file's type. Gets or sets the group that owns this file or directory. Gets or sets the file's serial number (unique within file system). Gets or sets the number of hard links to this file. Gets or sets the file permissions (aka flags) for this file or directory. Gets or sets the user that owns this file or directory. Standard Unix-style file type. No type specified. A FIFO / Named Pipe. A character device. A normal directory. A block device. A regular file. A soft link. A unix socket. Interface implemented by classes representing a directory. Concrete type representing directory entries. Concrete type representing files. Gets all of the directory entries. Gets a self-reference, if available. Gets a specific directory entry, by name. The name of the directory entry. The directory entry, or null if not found. Creates a new file. The name of the file (relative to this directory). The newly created file. Interface implemented by a class representing a file. File system implementations should have a class that implements this interface. If the file system implementation is read-only, it is acceptable to throw NotImplementedException from setters. Gets or sets the last creation time in UTC. Gets or sets the file's attributes. Gets a buffer to access the file's contents. Gets the length of the file. Gets or sets the last access time in UTC. Gets or sets the last write time in UTC. Interface implemented by classes representing files, in file systems that support multi-stream files. Creates a new stream. The name of the stream. An object representing the stream. Opens an existing stream. The name of the stream. An object representing the stream. The implementation must not implicitly create the stream if it doesn't already exist. Interface implemented by classes representing a directory. Concrete type representing directory entries. Concrete type representing files. Gets the target path for this symlink. Base class for a context object that holds global state for file system implementations. Base class for directory entries in a file system. File system implementations should have a class that derives from this abstract class. If the file system implementation is read-only, it is acceptable to throw NotImplementedException from methods that attempt to modify the file system. Gets the creation time of the file or directory. May throw NotSupportedException if HasVfsTimeInfo is false. Gets the file attributes from the directory entry. May throw NotSupportedException if HasVfsFileAttributes is false. Gets the name of this directory entry. Gets a value indicating whether this directory entry contains file attribute information. Typically either always returns true or false. Gets a value indicating whether this directory entry contains time information. Typically either always returns true or false. Gets a value indicating whether this directory entry represents a directory (rather than a file). Gets a value indicating whether this directory entry represents a symlink (rather than a file or directory). Gets the last access time of the file or directory. May throw NotSupportedException if HasVfsTimeInfo is false. Gets the last write time of the file or directory. May throw NotSupportedException if HasVfsTimeInfo is false. Gets a version of FileName that can be used in wildcard matches. The returned name, must have an extension separator '.', and not have any optional version information found in some files. The returned name is matched against a wildcard patterns such as "*.*". Gets a unique id for the file or directory represented by this directory entry. Base class for VFS file systems. The concrete type representing directory entries. The concrete type representing files. The concrete type representing directories. The concrete type holding global state. Initializes a new instance of the VfsFileSystem class. The default file system options. Gets or sets the global shared state. Gets or sets the object representing the root directory. Gets the volume label. Copies a file - not supported on read-only file systems. The source file. The destination file. Whether to permit over-writing of an existing file. Creates a directory - not supported on read-only file systems. The path of the new directory. Deletes a directory - not supported on read-only file systems. The path of the directory to delete. Deletes a file - not supported on read-only file systems. The path of the file to delete. Indicates if a directory exists. The path to test. true if the directory exists. Indicates if a file exists. The path to test. true if the file exists. Gets the names of subdirectories in a specified directory matching a specified search pattern, using a value to determine whether to search subdirectories. The path to search. The search string to match against. Indicates whether to search subdirectories. Array of directories matching the search pattern. Gets the names of files in a specified directory matching a specified search pattern, using a value to determine whether to search subdirectories. The path to search. The search string to match against. Indicates whether to search subdirectories. Array of files matching the search pattern. Gets the names of all files and subdirectories in a specified directory. The path to search. Array of files and subdirectories matching the search pattern. Gets the names of files and subdirectories in a specified directory matching a specified search pattern. The path to search. The search string to match against. Array of files and subdirectories matching the search pattern. Moves a directory. The directory to move. The target directory name. Moves a file. The file to move. The target file name. Overwrite any existing file. Opens the specified file. The full path of the file to open. The file mode for the created stream. The access permissions for the created stream. The new stream. Gets the attributes of a file or directory. The file or directory to inspect. The attributes of the file or directory. Sets the attributes of a file or directory. The file or directory to change. The new attributes of the file or directory. Gets the creation time (in UTC) of a file or directory. The path of the file or directory. The creation time. Sets the creation time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the last access time (in UTC) of a file or directory. The path of the file or directory. The last access time. Sets the last access time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the last modification time (in UTC) of a file or directory. The path of the file or directory. The last write time. Sets the last modification time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the length of a file. The path to the file. The length in bytes. Gets all directory entries in the specified directory and sub-directories. The path to inspect. Delegate invoked for each directory entry. Gets the file object for a given path. The path to query. The file object corresponding to the path. Converts a directory entry to an object representing a file. The directory entry to convert. The corresponding file object. Converts an internal directory entry name into an external one. The name to convert. The external name. This method is called on a single path element (i.e. name contains no path separators). Delegate for processing directory entries. Full path to the directory entry. The directory entry itself. Base class for the public facade on a file system. The derived class can extend the functionality available from a file system beyond that defined by DiscFileSystem. Initializes a new instance of the VfsFileSystemFacade class. The actual file system instance. Indicates whether the file system is read-only or read-write. true if the file system is read-write. Gets a friendly name for the file system. Gets a value indicating whether the file system is thread-safe. Gets the file system options, which can be modified. Gets the root directory of the file system. Gets the volume label. Copies an existing file to a new file. The source file. The destination file. Copies an existing file to a new file. The source file. The destination file. Overwrite any existing file. Creates a directory. The path of the new directory. Deletes a directory. The path of the directory to delete. Deletes a directory, optionally with all descendants. The path of the directory to delete. Determines if the all descendants should be deleted. Deletes a file. The path of the file to delete. Indicates if a directory exists. The path to test. true if the directory exists. Indicates if a file exists. The path to test. true if the file exists. Indicates if a file or directory exists. The path to test. true if the file or directory exists. Gets the names of subdirectories in a specified directory. The path to search. Array of directories. Gets the names of subdirectories in a specified directory matching a specified search pattern. The path to search. The search string to match against. Array of directories matching the search pattern. Gets the names of subdirectories in a specified directory matching a specified search pattern, using a value to determine whether to search subdirectories. The path to search. The search string to match against. Indicates whether to search subdirectories. Array of directories matching the search pattern. Gets the names of files in a specified directory. The path to search. Array of files. Gets the names of files in a specified directory. The path to search. The search string to match against. Array of files matching the search pattern. Gets the names of files in a specified directory matching a specified search pattern, using a value to determine whether to search subdirectories. The path to search. The search string to match against. Indicates whether to search subdirectories. Array of files matching the search pattern. Gets the names of all files and subdirectories in a specified directory. The path to search. Array of files and subdirectories matching the search pattern. Gets the names of files and subdirectories in a specified directory matching a specified search pattern. The path to search. The search string to match against. Array of files and subdirectories matching the search pattern. Moves a directory. The directory to move. The target directory name. Moves a file. The file to move. The target file name. Moves a file, allowing an existing file to be overwritten. The file to move. The target file name. Whether to permit a destination file to be overwritten. Opens the specified file. The full path of the file to open. The file mode for the created stream. The new stream. Opens the specified file. The full path of the file to open. The file mode for the created stream. The access permissions for the created stream. The new stream. Gets the attributes of a file or directory. The file or directory to inspect. The attributes of the file or directory. Sets the attributes of a file or directory. The file or directory to change. The new attributes of the file or directory. Gets the creation time (in local time) of a file or directory. The path of the file or directory. The creation time. Sets the creation time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the creation time (in UTC) of a file or directory. The path of the file or directory. The creation time. Sets the creation time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the last access time (in local time) of a file or directory. The path of the file or directory. The last access time. Sets the last access time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the last access time (in UTC) of a file or directory. The path of the file or directory. The last access time. Sets the last access time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the last modification time (in local time) of a file or directory. The path of the file or directory. The last write time. Sets the last modification time (in local time) of a file or directory. The path of the file or directory. The new time to set. Gets the last modification time (in UTC) of a file or directory. The path of the file or directory. The last write time. Sets the last modification time (in UTC) of a file or directory. The path of the file or directory. The new time to set. Gets the length of a file. The path to the file. The length in bytes. Gets an object representing a possible file. The file path. The representing object. The file does not need to exist. Gets an object representing a possible directory. The directory path. The representing object. The directory does not need to exist. Gets an object representing a possible file system object (file or directory). The file system path. The representing object. The file system object does not need to exist. Size of the Filesystem in bytes Used space of the Filesystem in bytes Available space of the Filesystem in bytes Provides access to the actual file system implementation. The concrete type representing directory entries. The concrete type representing files. The concrete type representing directories. The concrete type holding global state. The actual file system instance. Provides access to the actual file system implementation. The concrete type of the actual file system. The actual file system instance. Base class for logic to detect file systems. Detects if a stream contains any known file systems. The stream to inspect. A list of file systems (may be empty). Detects if a volume contains any known file systems. The volume to inspect. A list of file systems (may be empty). The logic for detecting file systems. The stream to inspect. Optionally, information about the volume. A list of file systems detected (may be empty). Attribute identifying file system factory classes. Class holding information about a file system. Initializes a new instance of the VfsFileSystemInfo class. The name of the file system. A one-line description of the file system. A delegate that can open streams as the indicated file system. Gets a one-line description of the file system. Gets the name of the file system. Opens a volume using the file system. The volume to access. Parameters for the file system. A file system instance. Opens a stream using the file system. The stream to access. Parameters for the file system. A file system instance. Delegate for instantiating a file system. The stream containing the file system. Optional, information about the volume the file system is on. Parameters for the file system. A file system implementation. Base class for read-only file system implementations. The concrete type representing directory entries. The concrete type representing files. The concrete type representing directories. The concrete type holding global state. Initializes a new instance of the VfsReadOnlyFileSystem class. The default file system options. Indicates whether the file system is read-only or read-write. Always false. Copies a file - not supported on read-only file systems. The source file. The destination file. Whether to permit over-writing of an existing file. Creates a directory - not supported on read-only file systems. The path of the new directory. Deletes a directory - not supported on read-only file systems. The path of the directory to delete. Deletes a file - not supported on read-only file systems. The path of the file to delete. Moves a directory - not supported on read-only file systems. The directory to move. The target directory name. Moves a file - not supported on read-only file systems. The file to move. The target file name. Whether to allow an existing file to be overwritten. Opens the specified file. The full path of the file to open. The file mode for the created stream. The new stream. Sets the attributes of a file or directory - not supported on read-only file systems. The file or directory to change. The new attributes of the file or directory. Sets the creation time (in UTC) of a file or directory - not supported on read-only file systems. The path of the file or directory. The new time to set. Sets the last access time (in UTC) of a file or directory - not supported on read-only file systems. The path of the file or directory. The new time to set. Sets the last modification time (in UTC) of a file or directory - not supported on read-only file systems. The path of the file or directory. The new time to set. Base class representing virtual hard disks. Finalizes an instance of the VirtualDisk class. Gets the set of disk formats supported as an array of file extensions. Gets the set of disk types supported, as an array of identifiers. Gets the geometry of the disk. Gets the geometry of the disk as it is anticipated a hypervisor BIOS will represent it. Gets the type of disk represented by this object. Gets the capacity of the disk (in bytes). Gets the size of the disk's logical blocks (aka sector size), in bytes. Gets the logical sector size of the disk, in bytes. This is an alias for the BlockSize property. Gets the content of the disk as a stream. Note the returned stream is not guaranteed to be at any particular position. The actual position will depend on the last partition table/file system activity, since all access to the disk contents pass through a single stream instance. Set the stream position before accessing the stream. Gets the layers that make up the disk. Gets or sets the Windows disk signature of the disk, which uniquely identifies the disk. Gets a value indicating whether the disk appears to have a valid partition table. There is no reliable way to determine whether a disk has a valid partition table. The 'guess' consists of checking for basic indicators and looking for obviously invalid data, such as overlapping partitions. Gets the object that interprets the partition structure. It is theoretically possible for a disk to contain two independent partition structures - a BIOS/GPT one and an Apple one, for example. This method will return in order of preference, a GUID partition table, a BIOS partition table, then in undefined preference one of any other partition tables found. See PartitionTable.GetPartitionTables to gain access to all the discovered partition tables on a disk. Gets the parameters of the disk. Most of the parameters are also available individually, such as DiskType and Capacity. Gets information about the type of disk. This property provides access to meta-data about the disk format, for example whether the BIOS geometry is preserved in the disk file. Gets the set of supported variants of a type of virtual disk. A type, as returned by . A collection of identifiers, or empty if there is no variant concept for this type of disk. Gets information about disk type. The disk type, as returned by . The variant of the disk type. Information about the disk type. Create a new virtual disk, possibly within an existing disk. The file system to create the disk on. The type of disk to create (see ). The variant of the type to create (see ). The path (or URI) for the disk to create. The capacity of the new disk. The geometry of the new disk (or null). Untyped parameters controlling the creation process (TBD). The newly created disk. Create a new virtual disk. The type of disk to create (see ). The variant of the type to create (see ). The path (or URI) for the disk to create. The capacity of the new disk. The geometry of the new disk (or null). Untyped parameters controlling the creation process (TBD). The newly created disk. Create a new virtual disk. The type of disk to create (see ). The variant of the type to create (see ). The path (or URI) for the disk to create. The capacity of the new disk. The geometry of the new disk (or null). The user identity to use when accessing the path (or null). The password to use when accessing the path (or null). Untyped parameters controlling the creation process (TBD). The newly created disk. Create a new virtual disk. The type of disk to create (see ). The variant of the type to create (see ). The path (or URI) for the disk to create. Parameters controlling the capacity, geometry, etc of the new disk. The user identity to use when accessing the path (or null). The password to use when accessing the path (or null). The newly created disk. Opens an existing virtual disk. The path of the virtual disk to open, can be a URI. The desired access to the disk. The Virtual Disk, or null if an unknown disk format. Opens an existing virtual disk. The path of the virtual disk to open, can be a URI. The desired access to the disk. The user name to use for authentication (if necessary). The password to use for authentication (if necessary). The Virtual Disk, or null if an unknown disk format. Opens an existing virtual disk. The path of the virtual disk to open, can be a URI. Force the detected disk type (null to detect). The desired access to the disk. The user name to use for authentication (if necessary). The password to use for authentication (if necessary). The Virtual Disk, or null if an unknown disk format. The detected disk type can be forced by specifying a known disk type: RAW, VHD, VMDK, etc. Opens an existing virtual disk, possibly from within an existing disk. The file system to open the disk on. The path of the virtual disk to open. The desired access to the disk. The Virtual Disk, or null if an unknown disk format. Disposes of this instance, freeing underlying resources. Reads the first sector of the disk, known as the Master Boot Record. The MBR as a byte array. Overwrites the first sector of the disk, known as the Master Boot Record. The master boot record, must be 512 bytes in length. Create a new differencing disk, possibly within an existing disk. The file system to create the disk on. The path (or URI) for the disk to create. The newly created disk. Create a new differencing disk. The path (or URI) for the disk to create. The newly created disk. Disposes of underlying resources. true if running inside Dispose(), indicating graceful cleanup of all managed objects should be performed, or false if running inside destructor. Enumeration of different classes of disk. Unknown (or unspecified) type. Hard disk. Optical disk, such as CD or DVD. Floppy disk. Base class represented a stored extent of a virtual disk. Some file formats can divide a logical disk layer into multiple extents, stored in different files. This class represents those extents. Normally, all virtual disks have at least one extent. Gets the capacity of the extent (in bytes). Gets a value indicating whether the extent only stores meaningful sectors. Gets the size of the extent (in bytes) on underlying storage. Disposes of this instance, freeing underlying resources. Gets the content of this extent. The parent stream (if any). Controls ownership of the parent stream. The content as a stream. Disposes of underlying resources. true if running inside Dispose(), indicating graceful cleanup of all managed objects should be performed, or false if running inside destructor. Represents the base layer, or a differencing layer of a VirtualDisk. VirtualDisks are composed of one or more layers - a base layer which represents the entire disk (even if not all bytes are actually stored), and a number of differencing layers that store the disk sectors that are logically different to the base layer. Disk Layers may not store all sectors. Any sectors that are not stored are logically zero's (for base layers), or holes through to the layer underneath (all other layers). Gets the capacity of the disk (in bytes). Gets and sets the logical extents that make up this layer. Gets the full path to this disk layer, or empty string. Gets the geometry of the virtual disk layer. Gets a value indicating whether the layer only stores meaningful sectors. Gets a value indicating whether this is a differential disk. Gets a FileLocator that can resolve relative paths, or null. Typically used to locate parent disks. Disposes of this instance, freeing underlying resources. Finalizes an instance of the VirtualDiskLayer class. Gets the content of this layer. The parent stream (if any). Controls ownership of the parent stream. The content as a stream. Gets the possible locations of the parent file (if any). Array of strings, empty if no parent. Disposes of underlying resources. true if running inside Dispose(), indicating graceful cleanup of all managed objects should be performed, or false if running inside destructor. Helps discover and use VirtualDiskFactory's Gets the set of disk formats supported as an array of file extensions. Gets the set of disk types supported, as an array of identifiers. Locates VirtualDiskFactory factories attributed with VirtualDiskFactoryAttribute, and types marked with VirtualDiskTransportAttribute, that are able to work with Virtual Disk types. An assembly to scan Common parameters for virtual disks. Not all attributes make sense for all kinds of disks, so some may be null. Modifying instances of this class does not modify the disk itself. Gets or sets the type of disk adapter. Gets or sets the logical (aka BIOS) geometry of the disk. Gets or sets the disk capacity. Gets or sets the type of disk (optical, hard disk, etc). Gets a dictionary of extended parameters, that varies by disk type. Gets or sets the physical (aka IDE) geometry of the disk. Information about a type of virtual disk. Gets or sets the algorithm for determining the geometry for a given disk capacity. Gets or sets a value indicating whether this disk type can represent hard disks. Gets or sets a value indicating whether this disk type requires a specific geometry for any given disk capacity. Gets or sets the name of the virtual disk type. Gets or sets a value indicating whether this disk type persists the BIOS geometry. Gets or sets the variant of the virtual disk type. Base class that holds information about a disk volume. Gets the one-byte BIOS type for this volume, which indicates the content. Gets the size of the volume, in bytes. Gets the stable volume identity. The stability of the identity depends the disk structure. In some cases the identity may include a simple index, when no other information is available. Best practice is to add disks to the Volume Manager in a stable order, if the stability of this identity is paramount. Gets the disk geometry of the underlying storage medium, if any (may be null). Gets the disk geometry of the underlying storage medium (as used in BIOS calls), may be null. Gets the offset of this volume in the underlying storage medium, if any (may be Zero). Opens the volume, providing access to it's contents. Stream that can access the volume's contents. VolumeManager interprets partitions and other on-disk structures (possibly combining multiple disks). Although file systems commonly are placed directly within partitions on a disk, in some cases a logical volume manager / logical disk manager may be used, to combine disk regions in multiple ways for data redundancy or other purposes. Initializes a new instance of the VolumeManager class. Initializes a new instance of the VolumeManager class. The initial disk to add. Initializes a new instance of the VolumeManager class. Content of the initial disk to add. Register new LogicalVolumeFactories detected in an assembly The assembly to inspect Gets the physical volumes held on a disk. The contents of the disk to inspect. An array of volumes. By preference, use the form of this method that takes a disk parameter. If the disk isn't partitioned, this method returns the entire disk contents as a single volume. Gets the physical volumes held on a disk. The disk to inspect. An array of volumes. If the disk isn't partitioned, this method returns the entire disk contents as a single volume. Adds a disk to the volume manager. The disk to add. The GUID the volume manager will use to identify the disk. Adds a disk to the volume manager. The contents of the disk to add. The GUID the volume manager will use to identify the disk. Gets the physical volumes from all disks added to this volume manager. An array of physical volumes. Gets the logical volumes from all disks added to this volume manager. An array of logical volumes. Gets a particular volume, based on it's identity. The volume's identity. The volume information for the volume, or returns null. Scans all of the disks for their physical and logical volumes. Common information for Windows files. Gets or sets the last time the file was changed. Gets or sets the creation time of the file. Gets or sets the file attributes. Gets or sets the last access time of the file. Gets or sets the modification time of the file. DateTimeOffset extension methods. The Epoch common to most (all?) Unix systems. Converts the current Unix time to a DateTimeOffset. Seconds since UnixEpoch. DateTimeOffset. Converts the current DateTimeOffset to Unix time. DateTimeOffset. Seconds since UnixEpoch.