|
org.openide.loaders 5.9.31 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.loaders.MultiDataObject.Entry org.openide.loaders.FileEntry
public class FileEntry
Entry that works with plain files. Copies, moves, renames and deletes them without any modification.
Nested Class Summary | |
---|---|
static class |
FileEntry.Folder
Simple entry for handling folders, on copy, move and createFromTemplate it creates new empty folder and copies attributes of source folder. |
static class |
FileEntry.Format
Specialized entry that simplifies substitution when a file entry is created from template. |
static class |
FileEntry.Numb
Simple file entry variant. |
Constructor Summary | |
---|---|
FileEntry(MultiDataObject obj,
FileObject fo)
Creates new file entry initially attached to a given file object. |
Method Summary | |
---|---|
FileObject |
copy(FileObject f,
String suffix)
Called when the entry is to be copied. |
FileObject |
createFromTemplate(FileObject f,
String name)
Called when the entry is to be created from a template. |
void |
delete()
Called when the entry is to be deleted. |
FileObject |
move(FileObject f,
String suffix)
Called when the entry is to be moved. |
FileObject |
rename(String name)
Called when the entry is to be renamed. |
Methods inherited from class org.openide.loaders.MultiDataObject.Entry |
---|
equals, getDataObject, getFile, hashCode, isImportant, isLocked, takeLock, writeReplace |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileEntry(MultiDataObject obj, FileObject fo)
obj
- the data object this entry belongs tofo
- the file object for the entryMethod Detail |
---|
public FileObject copy(FileObject f, String suffix) throws IOException
MultiDataObject.Entry
FileObject
,
or do nothing (if it cannot be copied).
copy
in class MultiDataObject.Entry
f
- the folder to create this entry insuffix
- the suffix to add to the name of original file
FileObject
or null
if it cannot be copied
IOException
- when the operation failspublic FileObject rename(String name) throws IOException
MultiDataObject.Entry
FileObject
,
or delete it (if it cannot be renamed).
rename
in class MultiDataObject.Entry
name
- the new name
FileObject
or null
if it has been deleted
IOException
- when the operation failspublic FileObject move(FileObject f, String suffix) throws IOException
MultiDataObject.Entry
FileObject
,
or delete it (if it cannot be moved).
move
in class MultiDataObject.Entry
f
- the folder to move this entry tosuffix
- the suffix to use
FileObject
or null
if it has been deleted
IOException
- when the operation failspublic void delete() throws IOException
MultiDataObject.Entry
delete
in class MultiDataObject.Entry
IOException
- when the operation failspublic FileObject createFromTemplate(FileObject f, String name) throws IOException
MultiDataObject.Entry
FileObject
,
or do nothing (if it cannot be copied).
createFromTemplate
in class MultiDataObject.Entry
f
- the folder to create this entry inname
- the new name to use
FileObject
or null
if it cannot be copied
IOException
- when the operation fails
|
org.openide.loaders 5.9.31 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |