Serializable
FileEntry.Format
public class FileEntry extends MultiDataObject.Entry
Modifier and Type | Class | Description |
---|---|---|
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 | Description |
---|---|
FileEntry(MultiDataObject obj,
org.openide.filesystems.FileObject fo) |
Creates new file entry initially attached to a given file object.
|
Modifier and Type | Method | Description |
---|---|---|
org.openide.filesystems.FileObject |
copy(org.openide.filesystems.FileObject f,
String suffix) |
Called when the entry is to be copied.
|
org.openide.filesystems.FileObject |
copyRename(org.openide.filesystems.FileObject f,
String name,
String ext) |
Called when the entry is to be copied and renamed.
|
org.openide.filesystems.FileObject |
createFromTemplate(org.openide.filesystems.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.
|
org.openide.filesystems.FileObject |
move(org.openide.filesystems.FileObject f,
String suffix) |
Called when the entry is to be moved.
|
org.openide.filesystems.FileObject |
rename(String name) |
Called when the entry is to be renamed.
|
equals, getDataObject, getFile, hashCode, isImportant, isLocked, takeLock, writeReplace
public FileEntry(MultiDataObject obj, org.openide.filesystems.FileObject fo)
obj
- the data object this entry belongs tofo
- the file object for the entrypublic org.openide.filesystems.FileObject copy(org.openide.filesystems.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 fileFileObject
or null
if it cannot be copiedIOException
- when the operation failspublic org.openide.filesystems.FileObject copyRename(org.openide.filesystems.FileObject f, String name, String ext) throws IOException
MultiDataObject.Entry
copyRename
in class MultiDataObject.Entry
f
- the folder to create this entry inname
- new file nameext
- new file extensionFileObject
, never nullIOException
- when the operation failspublic org.openide.filesystems.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 nameFileObject
or null
if it has been deletedIOException
- when the operation failspublic org.openide.filesystems.FileObject move(org.openide.filesystems.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 useFileObject
or null
if it has been deletedIOException
- when the operation failspublic void delete() throws IOException
MultiDataObject.Entry
delete
in class MultiDataObject.Entry
IOException
- when the operation failspublic org.openide.filesystems.FileObject createFromTemplate(org.openide.filesystems.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 useFileObject
or null
if it cannot be copiedIOException
- when the operation failsBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.