Class NameScope

java.lang.Object
org.apache.commons.vfs.NameScope

public final class NameScope extends 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 Details

    • CHILD

      public static final NameScope CHILD
      Resolve against the children of the base file. The name is resolved as described by FILE_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 by FILE_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 by FILE_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.

  • Method Details

    • toString

      public String toString()
      Returns the name of the scope.
      Overrides:
      toString in class Object
    • getName

      public String getName()
      Returns the name of the scope.