Package org.apache.commons.vfs
Class NameScope
- java.lang.Object
-
- org.apache.commons.vfs.NameScope
-
public final class NameScope extends java.lang.Object
An enumerated type for file name scope, used when resolving a name relative to a file.- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Adam Murdoch
-
-
Field Summary
Fields Modifier and Type Field Description static NameScope
CHILD
Resolve against the children of the base file.static NameScope
DESCENDENT
Resolve against the descendents of the base file.static NameScope
DESCENDENT_OR_SELF
Resolve against the descendents of the base file.static NameScope
FILE_SYSTEM
Resolve against files in the same file system as the base file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Returns the name of the scope.java.lang.String
toString()
Returns the name of the scope.
-
-
-
Field Detail
-
CHILD
public static final NameScope CHILD
Resolve against the children of the base file. The name is resolved as described byFILE_SYSTEM
. However, an exception is thrown if the resolved file is not a direct child of the base file.
-
DESCENDENT
public static final NameScope DESCENDENT
Resolve against the descendents of the base file. The name is resolved as described byFILE_SYSTEM
. However, an exception is thrown if the resolved file is not a descendent of the base file.
-
DESCENDENT_OR_SELF
public static final NameScope DESCENDENT_OR_SELF
Resolve against the descendents of the base file. The name is resolved as described byFILE_SYSTEM
. However, an exception is thrown if the resolved file is not a descendent of the base file, or the base files itself.
-
FILE_SYSTEM
public static final NameScope FILE_SYSTEM
Resolve against files in the same file system as the base file.If the supplied name is an absolute path, then it is resolved relative to the root of the file system that the base file belongs to. If a relative name is supplied, then it is resolved relative to the base file.
The path may use any mix of
/
,\
, or file system specific separators to separate elements in the path. It may also contain.
and..
elements.A path is considered absolute if it starts with a separator character, and relative if it does not.
-
-