You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.3 KiB
56 lines
1.3 KiB
9 years ago
|
using System.Collections.Generic;
|
||
|
using System.IO;
|
||
|
using Mono.Unix;
|
||
8 years ago
|
using NzbDrone.Common.Disk;
|
||
9 years ago
|
|
||
8 years ago
|
namespace NzbDrone.Mono.Disk
|
||
9 years ago
|
{
|
||
|
public class ProcMount : IMount
|
||
|
{
|
||
|
private readonly UnixDriveInfo _unixDriveInfo;
|
||
|
|
||
|
public ProcMount(DriveType driveType, string name, string mount, string type, Dictionary<string, string> options)
|
||
|
{
|
||
|
DriveType = driveType;
|
||
|
Name = name;
|
||
|
RootDirectory = mount;
|
||
|
DriveFormat = type;
|
||
|
|
||
|
_unixDriveInfo = new UnixDriveInfo(mount);
|
||
|
}
|
||
|
|
||
|
public long AvailableFreeSpace
|
||
|
{
|
||
|
get { return _unixDriveInfo.AvailableFreeSpace; }
|
||
|
}
|
||
|
|
||
|
public string DriveFormat { get; private set; }
|
||
|
|
||
|
public DriveType DriveType { get; private set; }
|
||
|
|
||
|
public bool IsReady
|
||
|
{
|
||
|
get { return _unixDriveInfo.IsReady; }
|
||
|
}
|
||
|
|
||
|
public string Name { get; private set; }
|
||
|
|
||
|
public string RootDirectory { get; private set; }
|
||
|
|
||
|
public long TotalFreeSpace
|
||
|
{
|
||
|
get { return _unixDriveInfo.TotalFreeSpace; }
|
||
|
}
|
||
|
|
||
|
public long TotalSize
|
||
|
{
|
||
|
get { return _unixDriveInfo.TotalSize; }
|
||
|
}
|
||
|
|
||
|
public string VolumeLabel
|
||
|
{
|
||
|
get { return _unixDriveInfo.VolumeLabel; }
|
||
|
}
|
||
|
}
|
||
|
}
|