org.millscript.commons.vfs.util
Class Resolver

java.lang.Object
  extended by org.millscript.commons.vfs.util.Resolver

public final class Resolver
extends java.lang.Object

A utility class providing URI path resolution methods for the virtual filesystem.


Method Summary
static VFile resolveAsFile(VFolder base, java.lang.String path)
          Resolves the specified path to a virtual file against the specified folder.
static VFolder resolveAsFolder(VFolder base, java.lang.String path)
          Resolves the specified path to a virtual folder against the specified folder.
static VVolume resolveAsVolume(VFolder base, java.lang.String path)
          Resolves the specified path to a new virtual volume against the specified folder, with the volumes root at the resolved path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

resolveAsFile

public static VFile resolveAsFile(VFolder base,
                                  java.lang.String path)
Resolves the specified path to a virtual file against the specified folder. The new file may have different parent folders.

Parameters:
base - the virtual folder to resolve the path against
path - the path to get a virtual file for
Returns:
a VFile for the specified relative URI

resolveAsFolder

public static VFolder resolveAsFolder(VFolder base,
                                      java.lang.String path)
Resolves the specified path to a virtual folder against the specified folder. The new folder may have different parent folders.

Parameters:
base - the virtual folder to resolve the path against
path - the path to get a virtual folder for
Returns:
a VFile for the specified relative URI

resolveAsVolume

public static VVolume resolveAsVolume(VFolder base,
                                      java.lang.String path)
Resolves the specified path to a new virtual volume against the specified folder, with the volumes root at the resolved path. For this to work it must be possible to resolve the specified path as a folder.

Parameters:
base - the virtual folder to resolve the path against
path - the path to get a virtual volume for
Returns:
a VVolume for the specified relative URI


Copyright © 2005-2007 Open World Ltd. All Rights Reserved.