Method Summary |
|
public void | bind(Path context) Binds the context to the current path. |
public boolean | canRead() Tests if the file can be read. |
public boolean | canWrite() Tests if the file can be written. |
public boolean | changeGroup(int gid) |
public boolean | changeGroup(String groupName) |
public boolean | changeOwner(int uid) |
public boolean | changeOwner(String ownerName) |
public boolean | chmod(int value) |
public boolean | createNewFile() Creates the file named by this Path and returns true if the
file is new. |
public Path | createRoot() Creates a restricted root, like the Unix chroot call. |
public Path | createRoot(SchemeMap schemeMap) |
public Path | createTempFile(String prefix, String suffix) Creates a unique temporary file as a child of this directory. |
public boolean | equals(Object o) |
public boolean | exists() Tests if the file exists. |
public Object | getAttribute(String name) Gets an attribute of the object. |
public Iterator | getAttributeNames() Returns a iterator of all attribute names set for this object. |
public String | getContentType() Returns the mime-type of the file. |
public long | getCrc64() Returns the crc64 code. |
public long | getCreateTime() Returns the create time of the file. |
public long | getDiskSpaceFree() |
public long | getDiskSpaceTotal() |
public String | getFullPath() Returns the full path, including the restricted root. |
public int | getGroup() |
public String | getHost() |
public long | getInode() |
public long | getLastAccessTime() Returns the last access time of the file. |
public long | getLastModified() Returns the last modified time of the file. |
public long | getLength() Returns the length of the file in bytes. |
public String | getNativePath() Returns the native representation of the path. |
public Object | getObject() Returns the object at this path. |
public int | getOwner() |
public Path | getParent() Returns the parent path. |
public String | getPath() Returns the path. |
public int | getPort() Returns the port. |
public String | getQuery() Returns the query string of the path. |
public String | getRelativePath() For union paths like MergePath, return the relative path into
that path. |
public ArrayList<Path> | getResources(String name) Looks up all the resources matching a name. |
public ArrayList<Path> | getResources() Looks up all the existing resources. |
public String | getScheme() |
public String | getTail() Returns the last segment of the path.
e.g. |
public String | getURL() Returns the full url for the given path. |
public String | getUserPath() Returns the last string used as a lookup, if available. |
public Object | getValue() Gets the object at the path. |
public Path | getWrappedPath() Returns the wrapped path. |
public int | hashCode() |
public boolean | isDirectory() Tests if the path refers to a directory. |
public boolean | isExecutable() |
public boolean | isFile() Tests if the path refers to a file. |
public boolean | isObject() Tests if the path refers to an object. |
public Iterator<String> | iterator() Returns a jdk1.2 Iterator for the contents of this directory. |
public String[] | list() |
public Path | lookup(String userPath, Map<String, Object> newAttributes) Returns a new path relative to the current one.
Path only handles scheme:xxx. |
public Path | lookupImpl(String userPath, Map<String, Object> newAttributes) Returns a new path relative to the current one.
Path only handles scheme:xxx. |
public Path | lookupNative(String name, Map<String, Object> attributes) Looks up a native path, adding attributes. |
public boolean | mkdir() Creates the directory named by this path. |
public boolean | mkdirs() Creates the directory named by this path and any parent directories. |
public WriteStream | openAppend() Opens a resin stream for appending. |
public StreamImpl | openAppendImpl() |
public RandomAccessStream | openRandomAccess() Opens a random-access stream. |
public StreamImpl | openReadImpl() |
public ReadWritePair | openReadWrite() Opens a resin ReadWritePair for reading and writing. |
public void | openReadWrite(ReadStream is, WriteStream os) Opens a resin ReadWritePair for reading and writing. |
public StreamImpl | openReadWriteImpl() |
public StreamImpl | openWriteImpl() |
public boolean | remove() Removes the file or directory named by this path. |
public boolean | removeAll() Removes the all files and directories below this path. |
public boolean | renameTo(Path path) Renames the file or directory to the name given by the path. |
protected Path | schemeWalk(String userPath, Map<String, Object> newAttributes, String newPath, int offset) Path-specific lookup. |
public boolean | setExecutable(boolean isExecutable) |
public void | setLastModified(long time) |
public void | setObject(Object obj) Sets the object at this path. |
public void | setUserPath(String userPath) Sets the user path. |
public void | setValue(Object obj) Sets the object at the path.
Normal filesystems will generally do nothing. |
public String | toString() |
public void | unbind() unbinds a link. |
public void | writeToStream(OutputStream os) Utility to write the contents of this path to the destination stream. |
public void | writeToStream(OutputStreamWithBuffer os) Utility to write the contents of this path to the destination stream. |