Public Member Functions |
| delegate void | DelegateError (Sylloge.FileSystem.Drive sender, string error) |
| | Defines a delegate function to handle the Sylloge.FileSystem.Drive.Error event.
|
| | Drive () |
| | The default constructor.
|
| | Drive (string letterOrDeviceID) |
| | Creates and opens a new instance with a specified drive letter or device ID.
|
| | Drive (string letterOrDeviceID, bool open) |
| | Create a new instance with a specified drive letter or device ID.
|
| void | Dispose () |
| | Closes this instance and frees any attached resources.
|
| void | Close () |
| | Close all handles to the device.
|
| Sylloge.FileSystem.Drive | Clone () |
| | Create a deep copy of the current drive.
|
| int | DeletePartitionInformation () |
| | Deletes the partition information from the drive. Once this is done, the drive is in RAW mode.
|
| int | Eject () |
| | Eject the current device if it is a removable device (thumb drive, etc.)
|
| bool | Open (string driveLetterOrDeviceId) |
| | Open a device or logical volume.
|
| bool | Open () |
| | Open the default device or logical volume.
|
| byte[] | Read (ulong sector) |
| | Read 'BytesPerSector' number of bytes from the disk starting at 'sector'.
|
| byte[] | Read (ulong sector, int count) |
| | Read 'count' number of bytes from the disk starting at 'sector'.
|
| bool | Seek (ulong sector, System.IO.SeekOrigin origin) |
| | Seek to a location on the device.
|
| override string | ToString () |
| | Returns a string representation of the current device.
|
| bool | Write (ulong sector, byte[] data) |
| | Write data starting at 'sector'.
|
Static Public Member Functions |
| static Sylloge.FileSystem.Drive[] | GetDrives (bool autoOpen) |
| | Gets the phyical drives attached to the machine.
|
| static Sylloge.FileSystem.Drive[] | GetVolumes (bool autoOpen) |
| | Gets the logical drives attached to the machine.
|
Properties |
| int | BytesPerSector [get, set] |
| | Gets the bytes per sector of the device.
|
| string | Caption [get, set] |
| | Gets the text displayed for the device.
|
| string | DeviceID [get, set] |
| | Gets the physical device id (\.) or logical volume letter associated with the device.
|
| string[] | DriveLetters [get, set] |
| | If accessing the device as a physical device, this returns any drive letters (logical Windows partitions) associated with the device.
|
| string | Description [get, set] |
| | Gets the description of the devices.
|
| ulong | FreeSpace [get, set] |
| | Gets the free space on the device.
|
| Microsoft.Win32.SafeHandles.SafeFileHandle | Handle [get, set] |
| | Gets the SafeFileHandle used to access the device.
|
| bool | IsLogicalDrive [get, set] |
| | Gets a value indicating if the device is a logical drive (true for yes, false for physical device)
|
| string | Name [get, set] |
| | Gets the name of the device.
|
| uint | Partitions [get, set] |
| | Gets the number of partitions on the device.
|
| uint | SectorsPerTrack [get, set] |
| | Gets the sectors per track of the device.
|
| ulong | Size [get, set] |
| | Gets the total size of the device.
|
| long | TotalCylinders [get, set] |
| | Gets the total cylinders of the device.
|
| ulong | TotalSectors [get, set] |
| | Gets the total sectors on the device.
|
| ulong | TotalTracks [get, set] |
| | Gets the total tracks on the device.
|
| uint | TracksPerCylinder [get, set] |
| | Gets the tracks per cylinder of the device.
|
| System.IO.DriveType | Type [get, set] |
| | Gets what kind of device this is as a System.IO.DriveType enum value.
|
| ulong | UsedSpace [get, set] |
| | Gets the used space of the device.
|
| bool | IsReady [get] |
| | Gets if the current device is ready for IO.
|
| bool | IsOpen [get, set] |
| | Gets if the current device is open and ready for IO.
|
| string | MediaType [get] |
| | Gets a string representation of what type of media the device is (i.e. CD ROM, USB DEVICE, etc.)
|
| long | Position [get] |
| | Gets the current byte position of the stream.
|
Events |
| DelegateError | Error |
| | Occurs when an error has happened when preforming an operation on the device.
|
Provides 'file-like' low level access to physical or logical drives.
Definition at line 29 of file Drive.cs.