com.caucho.vfs
Class Pwd
java.lang.Object
|
+--com.caucho.vfs.Pwd
- public final class Pwd
- extends java.lang.Object
Creates paths based on the current working directory. This facade
easiest way to create Path objects.
Path path = Pwd.lookup("foo.html");
The default scheme is the file scheme. Other schemes are
available using the full url.
Path mail = Pwd.lookup("mailto:drofnats@foo.com.test?subject='hi'");
Stream body = mail.openWrite();
body.writeln("How's it going?");
body.close();
Method Summary |
static Path |
lookup()
Returns a path for the current directory. |
static Path |
lookup(java.lang.String url)
Returns a new path relative to the current directory. |
static Path |
lookup(java.lang.String url,
java.util.Map attr)
Returns a new path, including attributes. |
static Path |
lookupNative(java.lang.String url)
Returns a path using the native filesystem conventions. |
static Path |
lookupNative(java.lang.String url,
java.util.Map attr)
Returns a native filesystem path with attributes. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
lookup
public static Path lookup(java.lang.String url)
- Returns a new path relative to the current directory.
- Parameters:
url
- a relative or absolute url- Returns:
- the new path.
lookup
public static Path lookup()
- Returns a path for the current directory.
lookup
public static Path lookup(java.lang.String url,
java.util.Map attr)
- Returns a new path, including attributes.
For example, an application may want to set locale headers
for an HTTP request.
- Parameters:
url
- the relative urlattr
- attributes used in searching for the url
lookupNative
public static Path lookupNative(java.lang.String url)
- Returns a path using the native filesystem conventions.
For example, on windows
Path path = Pwd.lookup("d:\\temp\\test.html");
- Parameters:
url
- a relative path using the native filesystem conventions.
lookupNative
public static Path lookupNative(java.lang.String url,
java.util.Map attr)
- Returns a native filesystem path with attributes.
- Parameters:
url
- a relative path using the native filesystem conventions.attr
- attributes used in searching for the url