|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.tuneology.avm.drive.Drive
This class implements native operations that are not otherwise available from Java.
Field Summary | |
protected DriveEntry |
ent
|
protected int |
refNum
private OSX variable |
static int |
TYPE_CDR
value returned by getDriveType |
static int |
TYPE_CDROM
value returned by getDriveType |
static int |
TYPE_CDRW
value returned by getDriveType |
static int |
TYPE_DVD
value returned by getDriveType |
static int |
TYPE_DVDR
value returned by getDriveType |
static int |
TYPE_DVDRAM
value returned by getDriveType |
static int |
TYPE_EJECTABLE
value returned by getDriveType |
static int |
TYPE_FIXEDDISC
value returned by getDriveType |
static int |
TYPE_FLOPPY
value returned by getDriveType |
static int |
TYPE_LOADABLE
value returned by getDriveType |
static int |
TYPE_LOOPBACK
value returned by getDriveType |
static int |
TYPE_NETWORK
value returned by getDriveType |
static int |
TYPE_OTHER
value returned by getDriveType |
static int |
TYPE_REMOVABLE
value returned by getDriveType |
Constructor Summary | |
protected |
Drive(DriveEntry ent)
|
Method Summary | |
static DriveEntry |
findDriveByDevice(java.lang.String dev)
|
static DriveEntry |
findDriveByScsiId(java.lang.String id)
|
static MountPoint |
findMountPointByDevice(java.lang.String dev)
|
static DriveEntry |
getDefaultCDROM()
Returns the first CD-ROM capable device in the drive list. |
java.lang.String |
getDevice()
Returns the device name. |
static java.util.ArrayList |
getDisktoolCmd()
|
static Drive |
getDrive(DriveEntry ent)
Returns a new Drive object for the specified drive. |
static DriveEntry[] |
getDriveList()
Returns a list of drives present on the computer. |
int |
getDriveType()
Returns the type of the drive. |
static int |
getDriveType(java.lang.String dev)
Returns the type of the drive. |
DriveEntry |
getEntry()
|
static java.util.ArrayList |
getHdiutilCmd()
|
java.lang.String |
getManufacturer()
Returns the device's manufacturer. |
java.lang.String |
getModel()
Returns the device's model name. |
static MountPoint |
getMountPoint(java.lang.String path)
Returns the mount point corresponding to the path If there are nested mount points, this will return the deepest nested point. |
MountPoint[] |
getMountPoints()
Returns the mount point. |
int |
getNameMax()
Returns the maximum number of characters in a filename for this file system. |
java.lang.String |
getScsiId()
Returns the scsi ID of the drive. |
static java.lang.String |
getScsiId(java.lang.String dev)
returns the SCSI ID of the device |
java.lang.String |
getVersion()
Returns the device's firmware revision. |
static java.lang.String |
getVersions()
returns the versions of the programs used. |
static boolean |
isCDR(int typ)
Returns true if the device type is a CD-R. |
static boolean |
isCdrom(int typ)
Returns true if the device type is a CD-ROM. |
static void |
setDiscFreeCmd(java.lang.String str)
Only needed for POSIX. |
static void |
setDisktoolCmd(java.lang.String str)
|
static void |
setFstabPath(java.lang.String str)
Only needed for POSIX. |
static void |
setHdiutilCmd(java.lang.String str)
|
static void |
setMountCmd(java.lang.String str)
|
static void |
setUmountCmd(java.lang.String str)
|
static void |
touch()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected DriveEntry ent
protected int refNum
public static final int TYPE_FIXEDDISC
public static final int TYPE_FLOPPY
public static final int TYPE_CDROM
public static final int TYPE_CDR
public static final int TYPE_CDRW
public static final int TYPE_DVD
public static final int TYPE_DVDR
public static final int TYPE_DVDRAM
public static final int TYPE_REMOVABLE
public static final int TYPE_EJECTABLE
public static final int TYPE_LOADABLE
public static final int TYPE_NETWORK
public static final int TYPE_LOOPBACK
public static final int TYPE_OTHER
Constructor Detail |
protected Drive(DriveEntry ent) throws java.lang.Exception
driveType
- java.lang.Exception
- getDrive(DriveEntry)
Method Detail |
public static Drive getDrive(DriveEntry ent) throws java.lang.Exception
path
- the path of the desired drive.java.lang.Exception
- public DriveEntry getEntry()
public int getDriveType()
public static int getDriveType(java.lang.String dev) throws java.lang.Exception
dev
- the path of the device.java.lang.Exception
- public static MountPoint findMountPointByDevice(java.lang.String dev) throws java.lang.Exception
dev
- java.lang.Exception
- public static DriveEntry findDriveByDevice(java.lang.String dev) throws java.lang.Exception
dev
- java.lang.Exception
- public static DriveEntry findDriveByScsiId(java.lang.String id) throws java.lang.Exception
id
- java.lang.Exception
- public static DriveEntry[] getDriveList() throws java.lang.Exception
java.lang.Exception
- public static DriveEntry getDefaultCDROM() throws java.lang.Exception
java.lang.Exception
- public java.lang.String getScsiId()
public MountPoint[] getMountPoints()
public java.lang.String getDevice()
public java.lang.String getManufacturer()
public java.lang.String getModel()
public java.lang.String getVersion()
public static void setDiscFreeCmd(java.lang.String str) throws java.io.IOException
public static void setFstabPath(java.lang.String str) throws java.io.IOException
public static boolean isCdrom(int typ)
public static boolean isCDR(int typ)
public static java.lang.String getVersions()
public int getNameMax()
public static java.lang.String getScsiId(java.lang.String dev)
public static void setHdiutilCmd(java.lang.String str) throws java.lang.Exception
str
- java.lang.Exception
- public static java.util.ArrayList getHdiutilCmd()
public static void setDisktoolCmd(java.lang.String str) throws java.lang.Exception
str
- java.lang.Exception
- public static java.util.ArrayList getDisktoolCmd()
public static void setMountCmd(java.lang.String str) throws java.io.IOException
str
- public static void setUmountCmd(java.lang.String str) throws java.io.IOException
str
- public static MountPoint getMountPoint(java.lang.String path) throws java.lang.Exception
foo% mount /dev/disk1 on / /dev/disk2 on /opt/ /dev/disk3 on /opt/disk ...Thus getMountPoint("/opt/disk/mp3/foo.mp3") will return the entry for /dev/disk3; getMountPoint("/opt/foo/") will return the entry for /dev/disk2, and getMountPoint("/usr/local/foo"); will return the entry for /.
public static void touch()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |