站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

FileEntry.Folder (NetBeans Loaders API) - NetBeans API Javadoc 5.0.0

 

org.openide.loaders
Class FileEntry.Folder

java.lang.Object
  extended byorg.openide.loaders.MultiDataObject.Entry
      extended byorg.openide.loaders.FileEntry.Folder
All Implemented Interfaces:
Serializable
Enclosing class:
FileEntry

public static final class FileEntry.Folder
extends MultiDataObject.Entry

Simple entry for handling folders, on copy, move and createFromTemplate it creates new empty folder and copies attributes of source folder. Operation on children should be performed explicitly by DataObject using this entry.

Since:
1.13
See Also:
Serialized Form

Constructor Summary
FileEntry.Folder(MultiDataObject obj, FileObject fo)
          Creates new FolderEntry
 
Method Summary
 FileObject copy(FileObject f, String suffix)
          Creates new folder and copies attributes.
 FileObject createFromTemplate(FileObject f, String name)
          Creates new folder and copies attributes, the template flag is cleared.
 void delete()
          Deletes folder associated with entry.
 FileObject move(FileObject f, String suffix)
          Nearly the same like (FileObject f, String suffix).
 FileObject rename(String name)
          Renames folder.
 
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

FileEntry.Folder

public FileEntry.Folder(MultiDataObject obj,
                        FileObject fo)
Creates new FolderEntry

Method Detail

copy

public FileObject copy(FileObject f,
                       String suffix)
                throws IOException
Creates new folder and copies attributes.

Specified by:
copy in class MultiDataObject.Entry
Parameters:
f - the folder to create this entry in
suffix - suffix appended to the new name to use
Returns:
the copied FileObject or null if it cannot be copied
Throws:
IOException - when the operation fails

move

public FileObject move(FileObject f,
                       String suffix)
                throws IOException
Nearly the same like (FileObject f, String suffix).

Specified by:
move in class MultiDataObject.Entry
Parameters:
f - the folder to move this entry to
suffix - suffix appended to the new name to use
Returns:
the moved FileObject or null if it has been deleted
Throws:
IOException - when the operation fails

createFromTemplate

public FileObject createFromTemplate(FileObject f,
                                     String name)
                              throws IOException
Creates new folder and copies attributes, the template flag is cleared.

Specified by:
createFromTemplate in class MultiDataObject.Entry
Parameters:
f - the folder to create this entry in
name - 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
Renames folder.

Specified by:
rename in class MultiDataObject.Entry
Parameters:
name - the new name
Returns:
the renamed FileObject or null if it has been deleted
Throws:
IOException - when the operation fails

delete

public void delete()
            throws IOException
Deletes folder associated with entry. Although filesystems delete folders recursively, it is better to delete children DataObjects before the FileEntry.Folder(org.openide.loaders.MultiDataObject, org.openide.filesystems.FileObject) entry is deleted.

Specified by:
delete in class MultiDataObject.Entry
Throws:
IOException - when the operation fails

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.