|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lightdev.app.filemanager.io.HttpFileSystem
public class HttpFileSystem
A class that implements the Light Development File System as a client to the Light Development HTTP File Server.
| Field Summary | |
|---|---|
static String |
SERVER_SIDE_FILE_MANAGEMENT_HANDLER_NAME
the name of the XML-RPC handler on the server side which is to be used for all XML-RPC requests from this class |
| Fields inherited from interface com.lightdev.lib.filesystem.FileSystem |
|---|
LOCAL_FILE_SYSTEM |
| Constructor Summary | |
|---|---|
HttpFileSystem(Session session)
create a new instance of class HttpFileSystem for an existing http connection |
|
| Method Summary | |
|---|---|
void |
addFileSystemListener(FileSystemListener listener)
|
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)
|
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 |
protected void |
fireContentChanged(FileSystemEvent event)
|
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 |
String |
getSessionId()
|
double |
getSize(FileRef[] 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 |
void |
removeFileSystemListener(FileSystemListener listener)
|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String SERVER_SIDE_FILE_MANAGEMENT_HANDLER_NAME
| Constructor Detail |
|---|
public HttpFileSystem(Session session)
session - the session to use for remote communication| Method Detail |
|---|
public FileRef[] list(FileRef folder)
throws Exception
list in interface FileSystemfolder - the directory to get the files for
Throwable
Exception
public String getFileSeparator()
throws Exception
getFileSeparator in interface FileSystemThrowable
Exception
public FileRef getParentFile(FileRef file)
throws Exception
getParentFile in interface FileSystemfile - the file to get the parent file for
Throwable
Exception
public FileRef[] getRoots()
throws Exception
getRoots in interface FileSystemThrowable
Exception
public boolean copy(FileRef[] filesToCopy,
FileRef toFolder)
throws Exception
copy in interface FileSystemfilesToCopy - the files to copytoFolder - the directory to copy to
Throwable
Exception
public void importFiles(FileRef[] sourceFiles,
FileRef importFolder,
FileSystem sourceFs)
throws Throwable
importFiles in interface FileSystemsourceFiles - 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
public void exportFiles(FileRef[] exportFiles,
FileRef targetFolder,
FileSystem targetFs)
throws Throwable
exportFiles in interface FileSystemThrowable
public FileRef rename(FileRef file,
String newName)
throws Exception
rename in interface FileSystemfile - the file to renamenewName - the new name; just the name, no path
Throwable
Exception
public boolean delete(FileRef[] filesToDelete)
throws Exception
delete in interface FileSystemfilesToDelete - the list of files to delete
Throwable
Exception
public boolean extract(FileRef archive,
FileRef toFolder)
throws Exception
extract in interface FileSystemarchive - the archive to extracttoFolder - the folder to extract the contents of the archive to
Throwable
Exception
public boolean move(FileRef[] filesToMove,
FileRef toFolder)
throws Exception
move in interface FileSystemfilesToMove - the files to movetoFolder - the folder to move to
Throwable
Exception
public boolean pack(FileRef folder,
FileRef archive)
throws Exception
pack in interface FileSystemfolder - the folder to packarchive - the archive to create from the given files
Throwable
Exception
public boolean createFolder(FileRef folder)
throws Exception
createFolder in interface FileSystemfolder - the folder to create
Throwable
Exception
public boolean fileExists(FileRef file)
throws Exception
fileExists in interface FileSystemfile - the file to determine existence for
Throwable
Exception
public double getSize(FileRef[] files)
throws Throwable
getSize in interface FileSystemThrowable
public double getFolderSize(FileRef folder)
throws Exception
getFolderSize in interface FileSystemfolder - the folder to determine the size for
Exception
public String getUrl()
throws Exception
getUrl in interface FileSystemExceptionpublic String getSessionId()
public byte[] read(FileRef file)
throws Exception
read in interface FileSystemfile - reference to the file to read
Exception
public boolean write(FileRef file,
byte[] contents)
throws Exception
write in interface FileSystemfile - reference to the file to writecontents - the contents to write to the referenced file
Exception
public void addFileSystemListener(FileSystemListener listener)
throws Throwable
addFileSystemListener in interface FileSystemThrowable
public void removeFileSystemListener(FileSystemListener listener)
throws Throwable
removeFileSystemListener in interface FileSystemThrowableprotected void fireContentChanged(FileSystemEvent event)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||