palmed.file
Class Root

java.lang.Object
  extended by palmed.file.Root
All Implemented Interfaces:
IDirectory

public final class Root
extends java.lang.Object
implements IDirectory

This class implements the root of all file systems roots.

Version:
$Revision: 419 $ $Date: 2006-10-30 18:30:41 +0900 (lun., 30 oct. 2006) $
Author:
Mathieu Champlon

Constructor Summary
Root()
           
 
Method Summary
 void accept(IDirectoryVisitor visitor)
          Visit the current directory.
 void create(java.lang.String name)
          Create a sub-directory.
 boolean isInPath(java.lang.String name)
          Test if a given name is in the path of the directory.
 boolean isWritable()
          Test if directories or files can be created in this directory.
 IDirectory select(java.lang.String filename, IFileBrowserListener listener)
          Select a file or sub-directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Root

public Root()
Method Detail

select

public IDirectory select(java.lang.String filename,
                         IFileBrowserListener listener)
Select a file or sub-directory.

Specified by:
select in interface IDirectory
Parameters:
filename - the item name
listener - the file selection listener
Returns:
a descriptor for the item

accept

public void accept(IDirectoryVisitor visitor)
Visit the current directory.

Specified by:
accept in interface IDirectory
Parameters:
visitor - the directory visitor

isWritable

public boolean isWritable()
Test if directories or files can be created in this directory.

Specified by:
isWritable in interface IDirectory
Returns:
whether directories or files can be created

create

public void create(java.lang.String name)
            throws java.io.IOException
Create a sub-directory.

Specified by:
create in interface IDirectory
Parameters:
name - the sub-directory name
Throws:
java.io.IOException - an io exception occured

isInPath

public boolean isInPath(java.lang.String name)
Test if a given name is in the path of the directory.

Specified by:
isInPath in interface IDirectory
Parameters:
name - the name to test
Returns:
whether the name is part of the path of the directory or not


Copyright © 2004-2006 PalmEd. All Rights Reserved.