|
OpenAPI 1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AQFileSystem
Filesystem
gets information from and interacts with the filesystem.
Synopsis:file system
Description
| Method Summary | |
|---|---|
void |
attrib(String source,
String attrName,
String attrValue)
Changes the permissions and/or attributes of a file or all files inside the specified directory. |
void |
concat(AQFileSet fileset,
String file)
Concatenates multiple files into a single one or displays to the console if file is not set. |
void |
copy(String source,
String destination)
Copies a single file to another file/directory or a directory to another directory. |
void |
copyFileSets(AQFileSet[] filesets,
String destination)
Copies a list of files as specified by the AQFilesSet object. |
boolean |
createDirectory(String directory)
Creates a directory. |
boolean |
deleteDirectory(String directory)
Delete a directory. |
boolean |
deleteDirectoryRecursively(String directory)
Delete a directory recursively. |
boolean |
deleteFile(String file)
Delete a single file. |
void |
deleteFileSets(AQFileSet[] filesets)
Deletes files and directories as specified in the AQFileSet object. |
int |
directoryCount(String location,
boolean recurse)
Retrieves the number of directories under the defined directory. |
long |
directorySize(String location,
boolean recurse)
Returns the size of a directory file denoted by this location name. |
boolean |
exists(String source)
Test whether a file or directory exists. |
int |
fileCount(String location,
boolean recurse)
Retrieves the number of files under a directory. |
long |
fileSize(String source)
Returns the length of the file defined as the source. |
void |
fixCRLF(String source,
String eol,
String eof)
Adjusts a text file or all files inside a directory to local conventions. |
long |
getFreeSpace(String partition)
Returns the number of unallocated bytes in the partition. |
long |
getTotalSpace(String partition)
Returns the size of the partition. |
long |
getUsableSpace(String partition)
Returns the number of bytes available to this virtual machine on the partition. |
boolean |
isDirectory(String directory)
Test whether the directory specified exists. |
boolean |
isFile(String file)
Test whether the file specified exists. |
boolean |
isHidden(String source)
Tests whether the file named by source is a hidden file. |
String |
lastModified(String Source)
Returns the time that the file or directory denoted by source was last modified. |
String[] |
list(String source)
Returns the files and directories defined in the source. |
void |
move(String source,
String destination)
Moves a single file to a new file or a directory to a new directory. |
void |
moveFileSets(AQFileSet[] filesets,
String destination)
Move files as specified in the AQFileSet object to a new location. |
AQFileSet |
newFileSet()
Returns a new instance of FileSet. |
void |
rename(String source,
String destination)
Renames a file or a directory. |
void |
renameExtensions(String source,
String from,
String to)
Renames the file extensions in the source directory. |
void |
replace(String directory,
String token,
String value)
Replaces the occurrence of a given string (token) with another string (value) in a file or all files inside a directory. |
void |
replaceRegExp(String directory,
String expression,
String substitution)
Replaces the occurrence of a given regular expression with a substitution pattern in a file or all files inside a directory. |
String[] |
scan(AQFileSet fileset)
Scans a directory as defined in a fileset and returns a list of files. |
String[] |
scan(String directory)
Scans a directory and return a list of files, including the subdirectories. |
void |
sync(String source,
String destination)
Synchronize a local target directory with files and subdirectories as defined in the source directory. |
void |
touch(String file,
String modificationTime)
Changes the modification time of a file and possibly creates it at the same time. |
| Method Detail |
|---|
void attrib(String source,
String attrName,
String attrValue)
throws Exception
attrNames are: archive, hidden, readonly and system.attrValues are: true and false. Any value other then
true will clear the attribute.
source - The file or directory to perform the task.attrName - The attribute to be changed. The valid attributes are
"archive", "hidden", "readonly" and "system".attrValue - "true" or "false", any value other then "true" will clear the
attribute.
Exception - on error
void concat(AQFileSet fileset,
String file)
throws Exception
file is not set.
fileset - A list of files, as defined in the AQFileSet object, to
perform the task; required.file - The location and name of the file; required.
Exception - on error
void copy(String source,
String destination)
throws Exception
source - The file to be copied; required.destination - The location of where the file will be copied; required.
Exception - on error
void copyFileSets(AQFileSet[] filesets,
String destination)
throws Exception
filesets - A list of files, as defined in the AQFileSet object, to
perform the task; required.destination - The directory where the files will be copied; required.
Exception - on error
boolean deleteFile(String file)
throws Exception
file - The name of the file to be deleted; required.
Exception - on error
boolean deleteDirectory(String directory)
throws Exception
directory - The name of the directory to be deleted; required.
Exception - on errorboolean deleteDirectoryRecursively(String directory)
directory - The name of the directory to be deleted; required.
void deleteFileSets(AQFileSet[] filesets)
throws Exception
filesets - A list of files, as defined in the AQFileSet object, to
perform the task; required.
Exception - on error
boolean exists(String source)
throws Exception
source - The file or directory; required.
Exception
long fileSize(String source)
throws Exception
source - The file; required.
Exception - on error
void fixCRLF(String source,
String eol,
String eof)
throws Exception
source - The file or directory to perform the task; required.eol - Specifies how end-of-line (EOL) characters are to be handled.
The EOL characters are CR, LF and the pair CRLF. Valid values
for this property are:eof - Specifies how DOS end of file (control-Z) characters are to be
handled. Valid values for this property are:
Exception - on error
long getTotalSpace(String partition)
throws Exception
partition - The name of the partition; required.
Exception
long getFreeSpace(String partition)
throws Exception
partition - The name of the partition; required.
Exception - on error
long getUsableSpace(String partition)
throws Exception
partition - The name of the partition; required.
Exception
boolean isDirectory(String directory)
throws Exception
directory - The name of the directory; required.
Exception - on error
boolean isFile(String file)
throws Exception
file - The name of the file; required.
Exception - on error
boolean isHidden(String source)
throws Exception
source - The name of the file; required.
Exception - on error
String lastModified(String Source)
throws Exception
Source - The file name or the directory name; required.
Exception - on error
String[] list(String source)
throws Exception
source - The directory; required.
Exception - on error
boolean createDirectory(String directory)
throws Exception
directory - The directory to create; required.
Exception - on errorAQFileSet newFileSet()
void move(String source,
String destination)
throws Exception
source - The file or directory to be moved; required.destination - The destination file or directory; required.
Exception - on error
void moveFileSets(AQFileSet[] filesets,
String destination)
throws Exception
filesets - A list of files to be moved as defined in the AQFileSet
object; required.destination - The destination directory; required.
Exception - on error
void rename(String source,
String destination)
throws Exception
source - The location and name of the file or directory to be renamed;
required.destination - The new name of the file or directory; required.
Exception - on error, if destination exists
void renameExtensions(String source,
String from,
String to)
throws Exception
source - Location of the files to be changed; required.from - Files with this extension to be changed; required.to - The new extension. E.g. "xls" for excel files, "txt" for text files; required
Exception - on error
void replace(String directory,
String token,
String value)
throws Exception
value is not specified.
directory - The location of the files to be changed; required.token - The given string to be changed; required.value - The new string value.
Exception - on error
void replaceRegExp(String directory,
String expression,
String substitution)
throws Exception
directory - The location of the files to be changed; required.expression - A regular expression; required.substitution - A substitution pattern; required.
Exception - on error
String[] scan(String directory)
throws Exception
directory - The name of the directory to be scanned; required.
Exception - on error
String[] scan(AQFileSet fileset)
throws Exception
fileset - The location and file pattern as defined in the AQFileSet
object; required.
Exception - on error
void sync(String source,
String destination)
throws Exception
source - The location of the files to be synchronized; required.destination - The destination directory. If the directory doesn't exist, it
will be created.
Exception - on error
void touch(String file,
String modificationTime)
throws Exception
file - The file to be touched. If the file doesn't exist, it will be
created.modificationTime - The new modification time of the file. The string should be in
the following format "MM/DD/YYYY HH:MM AM or PM" or
"MM/DD/YYYY HH:MM:SS AM or PM".
Exception - on error
int fileCount(String location,
boolean recurse)
throws Exception
true, it will count all files in the sub directories as well.
location - The location of the files to be counted; required. If location
is a file, an exception will be thrown.recurse - If recurse is true, count files in the sub directory, otherwise
don't include files in the sub directory in the count; required.
Exception - If the location is invalid or if location is not a directory.
int directoryCount(String location,
boolean recurse)
throws Exception
true, it will count all directories in the sub directories as well.
location - The location of the directories to be counted; required. If location
is a file, an exception will be thrown.recurse - If recurse is true, count directories in the sub directory, otherwise
don't include directories in the sub directory in the count; required.
Exception - If the location is invalid or if location is not a directory.
long directorySize(String location,
boolean recurse)
throws Exception
location - The location of the directory; required.recurse - If recurse is true, count files in the sub directory, otherwise
don't include files in the sub directory in the count; required
Exception - on error
|
OpenAPI 1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||