public class DiskSpaceUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMMAND_DISK_SPACE
If this system property is set, this command line is used to measure the free disk space.
|
static java.lang.String |
COMMAND_ULIMIT
If this system property is set, this command line is used to measure the ulimit.
|
static java.lang.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(java.io.File dir)
Get the available disk space in megabytes for the given directory using
the default interval.
|
long |
getAvailableDiskSpaceMB(java.io.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 java.lang.String COMMAND_DISK_SPACE
public static final java.lang.String COMMAND_ULIMIT
public static final java.lang.String INTERVAL
public static DiskSpaceUtil getInstance()
public int getMaxOpenFiles()
public long getAvailableDiskSpaceMB()
public long getAvailableDiskSpaceMB(java.io.File dir)
dir - the directorypublic long getAvailableDiskSpaceMB(java.io.File dir,
long interval)
dir - the directoryinterval - the interval in millisecondspublic long getDefaultMeasureInterval()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"