public class ArcStoIF
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BYTE |
static int |
CREATE_ERROR |
static int |
DELETE_ERROR |
static int |
GIGABYTE |
static int |
INVALID_DESTINATION |
static int |
IOEXCEPTION |
static int |
KILOBYTE |
static int |
MEGABYTE |
static int |
NIR_FILTER |
static int |
NOT_EMPTY |
static int |
NOT_FOUND |
static int |
RED_FILTER |
static int |
SUCCESS |
static int |
TERABYTE |
static int |
UNRESOLVED_ERROR |
static int |
WRONG_INPUT_FORMAT |
| Constructor and Description |
|---|
ArcStoIF() |
| Modifier and Type | Method and Description |
|---|---|
int |
copyDirectory(java.lang.String sourceDirname,
java.lang.String destDirname)
Copy a source directory inside the destination directory
|
int |
copyFile(java.lang.String sourceFilename,
java.lang.String destFilename) |
int |
deleteDirectory(java.lang.String dirname,
boolean deleteIfNotEmpty) |
int |
deleteFile(java.lang.String filename)
Deletes the specified file.
|
boolean |
directoryExists(java.lang.String dirname)
Informs whether a directory exists within the specified path.
|
boolean |
fileExists(java.lang.String filename)
Informs whether a file exists within the specified path.
|
java.util.ArrayList<java.lang.String> |
getAllContents(java.lang.String dirname)
Returns a list with all the names of the content files and directories of the specified directory.
|
long |
getDirectorySize(java.lang.String dirname) |
long |
getFileSize(java.lang.String filename) |
java.util.ArrayList<java.lang.String> |
getFitsFilesByFilter(java.lang.String directoryName,
int filter) |
java.lang.String |
getNameFromPath(java.lang.String path) |
double |
getVolumeFreeSpace(java.lang.String path,
int unit)
Gets the size of the free (unallocated) space of the volume that the provided path corresponds to.
|
double |
getVolumeTotalSpace(java.lang.String path,
int unit)
Gets the total size of the volume that the provided path corresponds to.
|
double |
getVolumeUsableSpace(java.lang.String path,
int unit)
Gets the size of the usable space of the volume that the provided path corresponds to.
|
int |
saveAsJpg(java.awt.image.BufferedImage img,
java.lang.String filename) |
int |
zipDirectory(java.lang.String inputDirname,
java.lang.String outputZippedFilename) |
public static final int SUCCESS
public static final int UNRESOLVED_ERROR
public static final int IOEXCEPTION
public static final int DELETE_ERROR
public static final int CREATE_ERROR
public static final int NOT_FOUND
public static final int WRONG_INPUT_FORMAT
public static final int INVALID_DESTINATION
public static final int NOT_EMPTY
public static final int RED_FILTER
public static final int NIR_FILTER
public static final int BYTE
public static final int KILOBYTE
public static final int MEGABYTE
public static final int GIGABYTE
public static final int TERABYTE
public int copyDirectory(java.lang.String sourceDirname,
java.lang.String destDirname)
sourceDirname - the source directory to be copieddestDirname - the containing destination directory where the source will be copiedpublic boolean fileExists(java.lang.String filename)
filename - the path to the filepublic boolean directoryExists(java.lang.String dirname)
dirname - the path to the directorypublic int copyFile(java.lang.String sourceFilename,
java.lang.String destFilename)
public int deleteDirectory(java.lang.String dirname,
boolean deleteIfNotEmpty)
public int deleteFile(java.lang.String filename)
filename - the path to the file.public int zipDirectory(java.lang.String inputDirname,
java.lang.String outputZippedFilename)
public java.util.ArrayList<java.lang.String> getAllContents(java.lang.String dirname)
dirname - public java.util.ArrayList<java.lang.String> getFitsFilesByFilter(java.lang.String directoryName,
int filter)
public java.lang.String getNameFromPath(java.lang.String path)
public int saveAsJpg(java.awt.image.BufferedImage img,
java.lang.String filename)
public long getFileSize(java.lang.String filename)
public long getDirectorySize(java.lang.String dirname)
public double getVolumeUsableSpace(java.lang.String path,
int unit)
path - unit - Must be one of BYTE, KILOBYTE, MEGABYTE, GIGABYTE, TERABYTEpublic double getVolumeTotalSpace(java.lang.String path,
int unit)
path - unit - Must be one of BYTE, KILOBYTE, MEGABYTE, GIGABYTE, TERABYTEpublic double getVolumeFreeSpace(java.lang.String path,
int unit)
path - unit - Must be one of BYTE, KILOBYTE, MEGABYTE, GIGABYTE, TERABYTE