Added SystemInfo and FileSystems to query system and file system information, respectively.

This commit is contained in:
Adam Murdoch
2012-08-12 06:17:58 +10:00
parent 5f3761dd41
commit 3a58e27eeb
18 changed files with 612 additions and 327 deletions

View File

@@ -0,0 +1,39 @@
package net.rubygrapefruit.platform.internal;
import net.rubygrapefruit.platform.FileSystem;
import java.io.File;
public class DefaultFileSystem implements FileSystem {
private final File mountPoint;
private final String fileSystemType;
private final String deviceName;
private final boolean remote;
public DefaultFileSystem(File mountPoint, String fileSystemType, String deviceName, boolean remote) {
this.mountPoint = mountPoint;
this.fileSystemType = fileSystemType;
this.deviceName = deviceName;
this.remote = remote;
}
@Override
public String getDeviceName() {
return deviceName;
}
@Override
public File getMountPoint() {
return mountPoint;
}
@Override
public String getFileSystemType() {
return fileSystemType;
}
@Override
public boolean isRemote() {
return remote;
}
}