public static UnixDriveInfo GetForSpecialFile(string specialFile) { if (specialFile == null) { throw new ArgumentNullException("specialFile"); } Native.Fstab f = Native.Syscall.getfsspec(specialFile); if (f == null) { throw new ArgumentException("specialFile isn't valid: " + specialFile); } return(new UnixDriveInfo(f)); }
public UnixDriveInfo(string mountPoint) { if (mountPoint == null) { throw new ArgumentNullException("mountPoint"); } Native.Fstab fstab = Native.Syscall.getfsfile(mountPoint); if (fstab != null) { FromFstab(fstab); } else { this.mount_point = mountPoint; this.block_device = ""; this.fstype = "Unknown"; } }
private UnixDriveInfo(Native.Fstab fstab) { FromFstab(fstab); }
private void FromFstab(Native.Fstab fstab) { this.fstype = fstab.fs_vfstype ?? String.Empty; this.mount_point = fstab.fs_file ?? String.Empty; this.block_device = fstab.fs_spec ?? String.Empty; }
private void FromFstab(Native.Fstab fstab) { this.fstype = fstab.fs_vfstype; this.mount_point = fstab.fs_file; this.block_device = fstab.fs_spec; }