| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--org.openide.filesystems.FileSystem
        |
        +--org.openide.filesystems.AbstractFileSystem
Implementation of FileSystem that simplifies the most
 common tasks. Caches information about the filesystem in
 memory and periodically refreshes its content.
 Many other operations are performed in a safer manner so as to reuse
 known experience; should be substantially simpler to subclass.
| Inner Class Summary | |
static interface | 
AbstractFileSystem.Attr
Handle attributes of files.  | 
static interface | 
AbstractFileSystem.Change
Controls modification of files.  | 
static interface | 
AbstractFileSystem.Info
Information about files.  | 
static interface | 
AbstractFileSystem.List
Provides access to the hierarchy of resources.  | 
static interface | 
AbstractFileSystem.Transfer
Controls on moving of files.  | 
| Inner classes inherited from class org.openide.filesystems.FileSystem | 
FileSystem.AtomicAction, FileSystem.Environment, FileSystem.Status | 
| Field Summary | |
protected  AbstractFileSystem.Attr | 
attr
Handling of attributes for files.  | 
protected  AbstractFileSystem.Change | 
change
Methods for modification of files.  | 
protected  AbstractFileSystem.Info | 
info
Methods for obtaining information about files.  | 
protected  AbstractFileSystem.List | 
list
Provider of hierarchy of files.  | 
protected  AbstractFileSystem.Transfer | 
transfer
Methods for moving of files.  | 
| Fields inherited from class org.openide.filesystems.FileSystem | 
PROP_HIDDEN, PROP_READ_ONLY, PROP_ROOT, PROP_SYSTEM_NAME, PROP_VALID | 
| Constructor Summary | |
AbstractFileSystem()
 | 
|
| Method Summary | |
protected  boolean | 
checkVirtual(String name)
This method is called from AbstractFileObject.isVirtual.  | 
protected  Reference | 
createReference(FileObject fo)
Creates Reference.  | 
protected  Enumeration | 
existingFileObjects(FileObject fo)
For the FileObject specified as parameter, returns the recursive enumeration of existing children fileobjects (both folders and data).  | 
 FileObject | 
find(String aPackage,
     String name,
     String ext)
Finds file in the filesystem by name.  | 
protected  Reference | 
findReference(String resourceName)
This method allows to find Reference to resourceName  | 
 FileObject | 
findResource(String name)
Finds file when its resource name is given.  | 
 SystemAction[] | 
getActions()
Returns an array of actions that can be invoked on any file in this file system.  | 
abstract  String | 
getDisplayName()
Provides a name for the system that can be presented to the user.  | 
protected  int | 
getRefreshTime()
Get the number of milliseconds between automatic refreshes of the directory structure.  | 
 FileObject | 
getRoot()
Getter for root folder in the filesystem.  | 
protected  void | 
markImportant(String name,
              boolean important)
Mark the file as being important or unimportant.  | 
protected  void | 
refreshResource(String name,
                boolean expected)
Allows subclasses to fire that a change occured in a file or folder.  | 
protected  FileObject | 
refreshRoot()
Instruct the filesystem that the root should change.  | 
protected  void | 
setRefreshTime(int ms)
Set the number of milliseconds between automatic refreshes of the directory structure.  | 
| Methods inherited from class org.openide.filesystems.FileSystem | 
addFileStatusListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, fireFileStatusChanged, firePropertyChange, fireVetoableChange, getActions, getCapability, getStatus, getSystemName, isDefault, isHidden, isPersistent, isReadOnly, isValid, prepareEnvironment, removeFileStatusListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, runAtomicAction, setCapability, setHidden, setSystemName, toString | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
protected AbstractFileSystem.List list
protected AbstractFileSystem.Change change
protected AbstractFileSystem.Transfer transfer
protected AbstractFileSystem.Info info
protected AbstractFileSystem.Attr attr
| Constructor Detail | 
public AbstractFileSystem()
| Method Detail | 
public abstract String getDisplayName()
FileSystem
 This call should never be used to attempt to identify the file root
 of the filesystem. On some systems it may happen to look the same but this is a
 coincidence and may well change in the future. Either check whether
 you are working with a LocalFileSystem or similar implementation and use
 LocalFileSystem.getRootDirectory(); or better, try
 FileUtil.toFile(org.openide.filesystems.FileObject) which is designed to do this correctly.
getDisplayName in class FileSystemorg.openide.filesystems.FileSystempublic FileObject getRoot()
FileSystemgetRoot in class FileSystemorg.openide.filesystems.FileSystem
public FileObject find(String aPackage,
                       String name,
                       String ext)
FileSystem
 The default implementation converts dots in the package name into slashes,
 concatenates the strings, adds any extension prefixed by a dot and calls
 the findResource method.
 
Note: when both of name and ext are null then name and
    extension should be ignored and scan should look only for a package.
find in class FileSystemorg.openide.filesystems.FileSystemaPackage - package name where each package component is separated by a dotname - name of the file (without dots) or null if
    one wants to obtain a folder (package) and not a file in itext - extension of the file (without leading dot) or null if one needs
    a package and not a filenull if the file does not existpublic FileObject findResource(String name)
FileSystemClassLoader.getResource(String)
 method. So it may consist of "package1/package2/filename.ext".
 If there is no package, it may consist only of "filename.ext".findResource in class FileSystemorg.openide.filesystems.FileSystemname - resource namenull if the file does not existprotected Reference createReference(FileObject fo)
fo - is FileObject. It`s reference yourequire to get.protected final Reference findReference(String resourceName)
resourceName - is name of resourcepublic SystemAction[] getActions()
FileSystemMenu,
 Popup,
 and Toolbar presenters.getActions in class FileSystemorg.openide.filesystems.FileSystemprotected final void setRefreshTime(int ms)
ms - number of milliseconds between two refreshes; if <= 0 then refreshing is disabledprotected final int getRefreshTime()
0 if refreshing is disabledprotected final FileObject refreshRoot()
protected final void refreshResource(String name,
                                     boolean expected)
name - resource name of the file where the change occuredexpected - true if the user initiated change and expects itprotected final Enumeration existingFileObjects(FileObject fo)
fo - the starting point for the recursive fileobject searchprotected boolean checkVirtual(String name)
name - of the file
protected void markImportant(String name,
                             boolean important)
name - the file to markimportant - true indicates that file is important, false conversely 
 file is unimportant.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||