|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.vfs.provider.AbstractVfsComponent
org.apache.commons.vfs.impl.DefaultFileReplicator
A simple file replicator and temporary file store.
| Constructor Summary | |
DefaultFileReplicator()
|
|
DefaultFileReplicator(File tempDir)
constructor to set the location of the temporary directory |
|
| Method Summary | |
File |
allocateFile(String baseName)
Allocates a new temporary file. |
void |
close()
Closes the replicator, deleting all temporary files. |
protected File |
createFile(File parent,
String name)
create the temporary file |
protected String |
createFilename(String baseName)
create the temporary file name |
protected long |
getFilecount()
|
void |
init()
Initialises this component. |
File |
replicateFile(FileObject srcFile,
FileSelector selector)
Creates a local copy of the file, and all its descendents. |
| Methods inherited from class org.apache.commons.vfs.provider.AbstractVfsComponent |
getContext, getLogger, setContext, setLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultFileReplicator(File tempDir)
tempDir - public DefaultFileReplicator()
| Method Detail |
public void init()
throws FileSystemException
init in interface VfsComponentinit in class AbstractVfsComponentFileSystemExceptionpublic void close()
close in interface VfsComponentclose in class AbstractVfsComponent
public File allocateFile(String baseName)
throws FileSystemException
allocateFile in interface TemporaryFileStorebaseName - The name of the file.
FileSystemExceptionprotected long getFilecount()
protected String createFilename(String baseName)
protected File createFile(File parent,
String name)
throws FileSystemException
FileSystemException
public File replicateFile(FileObject srcFile,
FileSelector selector)
throws FileSystemException
replicateFile in interface FileReplicatorsrcFile - The file to copy.selector - Selects the files to copy.
FileSystemException - If the source files does not exist, or on error copying.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||