|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface FileSystem
Classes that represent a file system in the context of this package need to implement this interface.
| Field Summary | |
|---|---|
static String |
LOCAL_FILE_SYSTEM
url string for a local file system |
| Method Summary | |
|---|---|
void |
addFileSystemListener(FileSystemListener listener)
add a listener to this file system |
boolean |
copy(FileRef[] filesToCopy,
FileRef toFolder)
copy files to a given folder. |
boolean |
createFolder(FileRef folder)
create a new folder |
boolean |
delete(FileRef[] filesToDelete)
delete one or more files |
void |
exportFiles(FileRef[] exportFiles,
FileRef targetFolder,
FileSystem targetFs)
export from this file system to a given target file system |
boolean |
extract(FileRef archive,
FileRef toFolder)
extract a given ZIP archive to a given folder |
boolean |
fileExists(FileRef file)
determine whether or not a given file exists in this instance of file system |
String |
getFileSeparator()
get the string that is used to separate file and folder names in path expressions for the machine this file system refers to |
double |
getFolderSize(FileRef folder)
determine the size of a folder in bytes |
FileRef |
getParentFile(FileRef file)
get the file that is directly on top of a given file in the file hierarchy of this file system |
FileRef[] |
getRoots()
get the root directories of this file system |
double |
getSize(FileRef[] files)
get the total size of a number of files |
String |
getUrl()
get the url string of the machine this file system is located |
void |
importFiles(FileRef[] sourceFiles,
FileRef importFolder,
FileSystem sourceFs)
import from a given file system to this file system |
FileRef[] |
list(FileRef folder)
get the files that are contained in a given folder |
boolean |
move(FileRef[] filesToMove,
FileRef toFolder)
move one or more files to a given folder. |
boolean |
pack(FileRef folder,
FileRef archive)
pack the contents of a given folder into a new ZIP compressed archive |
byte[] |
read(FileRef file)
read contents of a file using a byte array in memory as a buffer |
void |
removeFileSystemListener(FileSystemListener listener)
remove a listener from this file system |
FileRef |
rename(FileRef file,
String newName)
rename a file, i.e. change the name of a file but not its location |
boolean |
write(FileRef file,
byte[] contents)
write contents of a file using a byte array in memory as a buffer |
| Field Detail |
|---|
static final String LOCAL_FILE_SYSTEM
| Method Detail |
|---|
void addFileSystemListener(FileSystemListener listener)
throws Throwable
listener - the listener to add
Throwable
void removeFileSystemListener(FileSystemListener listener)
throws Throwable
listener - the listener to remove
Throwable
String getFileSeparator()
throws Throwable
Throwable
FileRef[] getRoots()
throws Throwable
Throwable
FileRef getParentFile(FileRef file)
throws Throwable
file - the file to get the parent file for
Throwable
FileRef[] list(FileRef folder)
throws Throwable
folder - the directory to get the files for
Throwable
FileRef rename(FileRef file,
String newName)
throws Throwable
file - the file to renamenewName - the new name; just the name, no path
Throwable
boolean copy(FileRef[] filesToCopy,
FileRef toFolder)
throws Throwable
filesToCopy - the files to copytoFolder - the directory to copy to
Throwable
boolean move(FileRef[] filesToMove,
FileRef toFolder)
throws Throwable
filesToMove - the files to movetoFolder - the folder to move to
Throwable
boolean createFolder(FileRef folder)
throws Throwable
folder - the folder to create
Throwable
boolean delete(FileRef[] filesToDelete)
throws Throwable
filesToDelete - the list of files to delete
Throwable
boolean pack(FileRef folder,
FileRef archive)
throws Throwable
folder - the folder to packarchive - the archive to create from the given files
Throwable
boolean extract(FileRef archive,
FileRef toFolder)
throws Throwable
archive - the archive to extracttoFolder - the folder to extract the contents of the archive to
Throwable
boolean fileExists(FileRef file)
throws Throwable
file - the file to determine existence for
Throwable
double getFolderSize(FileRef folder)
throws Throwable
folder - the folder to determine the size for
Throwable
double getSize(FileRef[] files)
throws Throwable
files - the files to determine the total size for
Throwable
String getUrl()
throws Throwable
Throwable
boolean write(FileRef file,
byte[] contents)
throws Throwable
file - reference to the file to writecontents - the contents to write to the referenced file
Throwable
byte[] read(FileRef file)
throws Throwable
file - reference to the file to read
Throwable
void importFiles(FileRef[] sourceFiles,
FileRef importFolder,
FileSystem sourceFs)
throws Throwable
sourceFiles - references to the files in the source file system that are to be importedimportFolder - folder of this file system to import tosourceFs - the file system to import from
Throwable
void exportFiles(FileRef[] exportFiles,
FileRef targetFolder,
FileSystem targetFs)
throws Throwable
exportFiles - references to the files in this file system to exporttargetFolder - the folder of the target files system to export totargetFs - the file system to export to
Throwable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||