org.openide.loaders
Class FileEntry
java.lang.Object
|
+--org.openide.loaders.MultiDataObject.Entry
|
+--org.openide.loaders.FileEntry
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- FileEntry.Format
- public class FileEntry
- extends MultiDataObject.Entry
Entry that works with plain files. Copies, moves,
renames and deletes them without any modification.
- See Also:
- Serialized Form
Inner Class Summary |
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. |
FileEntry
public FileEntry(MultiDataObject obj,
FileObject fo)
- Creates new file entry initially attached to a given file object.
- Parameters:
obj
- the data object this entry belongs tofo
- the file object for the entry
copy
public FileObject copy(FileObject f,
String suffix)
throws IOException
- Description copied from class:
MultiDataObject.Entry
- Called when the entry is to be copied.
Depending on the entry type, it should either copy the underlying
FileObject
,
or do nothing (if it cannot be copied).
- Overrides:
copy
in class MultiDataObject.Entry
- Following copied from class:
org.openide.loaders.MultiDataObject.Entry
- Parameters:
f
- the folder to create this entry inname
- the new name to use- Returns:
- the copied
FileObject
or null
if it cannot be copied - Throws:
IOException
- when the operation fails
rename
public FileObject rename(String name)
throws IOException
- Description copied from class:
MultiDataObject.Entry
- Called when the entry is to be renamed.
Depending on the entry type, it should either rename the underlying
FileObject
,
or delete it (if it cannot be renamed).
- Overrides:
rename
in class MultiDataObject.Entry
- Following copied from class:
org.openide.loaders.MultiDataObject.Entry
- Parameters:
name
- the new name- Returns:
- the renamed
FileObject
or null
if it has been deleted - Throws:
IOException
- when the operation fails
move
public FileObject move(FileObject f,
String suffix)
throws IOException
- Description copied from class:
MultiDataObject.Entry
- Called when the entry is to be moved.
Depending on the entry type, it should either move the underlying
FileObject
,
or delete it (if it cannot be moved).
- Overrides:
move
in class MultiDataObject.Entry
- Following copied from class:
org.openide.loaders.MultiDataObject.Entry
- Parameters:
f
- the folder to move this entry tosuffix
- the suffix to use- Returns:
- the moved
FileObject
or null
if it has been deleted - Throws:
IOException
- when the operation fails
delete
public void delete()
throws IOException
- Description copied from class:
MultiDataObject.Entry
- Called when the entry is to be deleted.
- Overrides:
delete
in class MultiDataObject.Entry
- Following copied from class:
org.openide.loaders.MultiDataObject.Entry
- Throws:
IOException
- when the operation fails
createFromTemplate
public FileObject createFromTemplate(FileObject f,
String name)
throws IOException
- Description copied from class:
MultiDataObject.Entry
- Called when the entry is to be created from a template.
Depending on the entry type, it should either copy the underlying
FileObject
,
or do nothing (if it cannot be copied).
- Overrides:
createFromTemplate
in class MultiDataObject.Entry
- Following copied from class:
org.openide.loaders.MultiDataObject.Entry
- Parameters:
f
- the folder to create this entry inname
- the new name to use- Returns:
- the copied
FileObject
or null
if it cannot be copied - Throws:
IOException
- when the operation fails
Built on February 22 2001. | Portions Copyright 1997-2000 Sun Microsystems, Inc. All rights reserved.