public class DiskSpaceUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COMMAND_DISK_SPACE
If this system property is set, this command line is used to measure the free disk space.
|
static String |
COMMAND_ULIMIT
If this system property is set, this command line is used to measure the ulimit.
|
static String |
INTERVAL
The maximum measure interval in milliseconds.
|
Constructor and Description |
---|
DiskSpaceUtil() |
Modifier and Type | Method and Description |
---|---|
long |
getAvailableDiskSpaceMB()
Get the available disk space in megabytes for the current working
directory using the default interval.
|
long |
getAvailableDiskSpaceMB(File dir)
Get the available disk space in megabytes for the given directory using
the default interval.
|
long |
getAvailableDiskSpaceMB(File dir,
long interval)
Get the available disk space in megabytes for the given directory and
using the given interval.
|
long |
getDefaultMeasureInterval() |
static DiskSpaceUtil |
getInstance()
Get the instance.
|
int |
getMaxOpenFiles()
Get the maximum number of open files for this process.
|
public static final String COMMAND_DISK_SPACE
public static final String COMMAND_ULIMIT
public static final String INTERVAL
public static DiskSpaceUtil getInstance()
public int getMaxOpenFiles()
public long getAvailableDiskSpaceMB()
public long getAvailableDiskSpaceMB(File dir)
dir
- the directorypublic long getAvailableDiskSpaceMB(File dir, long interval)
dir
- the directoryinterval
- the interval in millisecondspublic long getDefaultMeasureInterval()
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"