FileEntry.Formatpublic 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,
java.lang.String suffix) |
Called when the entry is to be copied.
|
org.openide.filesystems.FileObject |
copyRename(org.openide.filesystems.FileObject f,
java.lang.String name,
java.lang.String ext) |
Called when the entry is to be copied and renamed.
|
org.openide.filesystems.FileObject |
createFromTemplate(org.openide.filesystems.FileObject f,
java.lang.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,
java.lang.String suffix) |
Called when the entry is to be moved.
|
org.openide.filesystems.FileObject |
rename(java.lang.String name) |
Called when the entry is to be renamed.
|
equals, getDataObject, getFile, hashCode, isImportant, isLocked, takeLock, writeReplacepublic 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,
java.lang.String suffix)
throws java.io.IOException
MultiDataObject.EntryFileObject,
or do nothing (if it cannot be copied).copy in class MultiDataObject.Entryf - the folder to create this entry insuffix - the suffix to add to the name of original fileFileObject or null if it cannot be copiedjava.io.IOException - when the operation failspublic org.openide.filesystems.FileObject copyRename(org.openide.filesystems.FileObject f,
java.lang.String name,
java.lang.String ext)
throws java.io.IOException
MultiDataObject.EntrycopyRename in class MultiDataObject.Entryf - the folder to create this entry inname - new file nameext - new file extensionFileObject, never nulljava.io.IOException - when the operation failspublic org.openide.filesystems.FileObject rename(java.lang.String name)
throws java.io.IOException
MultiDataObject.EntryFileObject,
or delete it (if it cannot be renamed).rename in class MultiDataObject.Entryname - the new nameFileObject or null if it has been deletedjava.io.IOException - when the operation failspublic org.openide.filesystems.FileObject move(org.openide.filesystems.FileObject f,
java.lang.String suffix)
throws java.io.IOException
MultiDataObject.EntryFileObject,
or delete it (if it cannot be moved).move in class MultiDataObject.Entryf - the folder to move this entry tosuffix - the suffix to useFileObject or null if it has been deletedjava.io.IOException - when the operation failspublic void delete()
throws java.io.IOException
MultiDataObject.Entrydelete in class MultiDataObject.Entryjava.io.IOException - when the operation failspublic org.openide.filesystems.FileObject createFromTemplate(org.openide.filesystems.FileObject f,
java.lang.String name)
throws java.io.IOException
MultiDataObject.EntryFileObject,
or do nothing (if it cannot be copied).createFromTemplate in class MultiDataObject.Entryf - the folder to create this entry inname - the new name to useFileObject or null if it cannot be copiedjava.io.IOException - when the operation failsBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.