Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javafe.filespace
Class PathComponent

    java.lang.Object
      javafe.filespace.PathComponent

public class PathComponent
extends java.lang.Object

This module encapsulates how to convert from a Java path-component name to the hierarchical filespace it denotes.

Filespaces are represented by Trees whose node's data fields contain (non-null) GenericFiles that represent the corresponding files. E.g., the node at X.Y.Z represents a file with pathname ./X/Y/Z in the hierarchy of the path component.

Changes made to the underlying file system may or may not be reflected in the returned filespaces.

Constructor Summary
`PathComponent()`

Method Summary
`static Tree` | `empty()` Create an empty filespace, containing only a root directory
`protected static boolean` | `isZipFilename(java.lang.String name)` Does a filename indicate that it is in zip format?
`static void` | `main(java.lang.String[] args)` A simple test driver
`static Tree` | `open(java.lang.String component, boolean complain)` Convert from a path-component name to the filespace it denotes.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PathComponent

    public PathComponent()

Method Detail

### empty

    public static Tree empty()

  Create an empty filespace, containing only a root directory

### open

    public static Tree open(java.lang.String component,
                            boolean complain)
                     throws java.io.IOException

  Convert from a path-component name to the filespace it denotes.

  Throws an IOException if any errors occur while initially scanning the component. Component must be non-null. The result is always a non-null filespace.

  If complain is set, open will throw IOExceptions if the path component does not exist, or if it is not a directory or a zipfile. If complain is not set, then an empty filespace will be returned in these situations. Either way, IOExceptions will still be thrown if an error occurs reading an actual file or directory.

  Note: changes to the filesystem named by component may or may not be reflected in the returned Tree.

  Throws:
    `java.io.IOException`

### isZipFilename

    protected static boolean isZipFilename(java.lang.String name)

  Does a filename indicate that it is in zip format?

### main

    public static void main(java.lang.String[] args)
                     throws java.io.IOException

  A simple test driver

  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

The ESC/Java2 Project Homepage