Package org.apache.commons.vfs
Class NameScope
java.lang.Object
org.apache.commons.vfs.NameScope
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
FieldsModifier and TypeFieldDescriptionstatic final NameScope
Resolve against the children of the base file.static final NameScope
Resolve against the descendents of the base file.static final NameScope
Resolve against the descendents of the base file.static final NameScope
Resolve against files in the same file system as the base file. -
Method Summary
-
Field Details
-
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
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
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
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.
-
-
Method Details