|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.entitymanager.logic.file.FileLogic
public class FileLogic
A class to provide basic file functionalities.
Nested Class Summary | |
---|---|
(package private) class |
FileLogic.CopyDirVisitor
Inner Class used to copy whole directories. |
(package private) class |
FileLogic.FileTreeWalker
Inner Class used to pass recursively through the file lists. |
Field Summary | |
---|---|
private java.io.File |
clipboardFile
The file that represents the clipboard. |
private static FileLogic |
fileLogic
Static instance. |
private FileSystemsRootFile |
rootObject
Root of file systems. |
Constructor Summary | |
---|---|
private |
FileLogic()
Constructs the class to provide file functionalities. |
Method Summary | |
---|---|
protected void |
copy(java.io.File file)
Copies a file to the clipboard. |
protected java.lang.String |
createTruncatedZipEntryName(java.util.zip.ZipEntry zipEntry)
Returns the name of a file within a zip file. |
protected void |
delete(java.io.File file)
Deletes a file. |
java.io.File |
getClipboardFile()
Returns the file in the clipboard. |
FileSystemsRootFile |
getFileSystemsRoot()
Returns the root of file systems. |
static FileLogic |
getInstance()
Returns the instance of file logic. |
protected void |
paste(java.io.File destiny)
Pastes a file from the clipboard clipboardFile to the destination |
protected java.io.File |
rename(java.io.File file,
java.lang.String newName)
Renames a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static FileLogic fileLogic
getInstance()
private FileSystemsRootFile rootObject
private java.io.File clipboardFile
Constructor Detail |
---|
private FileLogic()
Method Detail |
---|
public static FileLogic getInstance()
public FileSystemsRootFile getFileSystemsRoot()
public java.io.File getClipboardFile()
protected java.lang.String createTruncatedZipEntryName(java.util.zip.ZipEntry zipEntry)
File names are stored with full path information in zip files.
zipEntry
- the zip entry of the file
protected java.io.File rename(java.io.File file, java.lang.String newName) throws FileRenameFailedException
file
- the file to rename.newName
- the new name
FileRenameFailedException
- if an error occurredprotected void copy(java.io.File file) throws FileCopyCutFailedException
file
- the file to be copied.
FileCopyCutFailedException
- if an error occurredprotected void paste(java.io.File destiny) throws FilePasteFailedException
clipboardFile
to the destination
FilePasteFailedException
- if an error occurredprotected void delete(java.io.File file) throws FileDeletionFailedException
file
- the file to delete.
FileRenameFailedException
- if an error occurred
FileDeletionFailedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |