pathwrapper.java

来自「RESIN 3.2 最新源码」· Java 代码 · 共 728 行 · 第 1/2 页

JAVA
728
字号
  /**   * Tests if the file can be written.   */  public boolean canWrite()  {    return getWrappedPath().canWrite();  }  /**   * Changes the permissions   */  public boolean chmod(int value)  {    return getWrappedPath().chmod(value);  }  /**   * @return The contents of this directory or null if the path does not   * refer to a directory.   */  public String []list() throws IOException  {    return getWrappedPath().list();  }  /**   * Returns a jdk1.2 Iterator for the contents of this directory.   */  public Iterator<String> iterator() throws IOException  {    return getWrappedPath().iterator();  }  /**   * Creates the directory named by this path.   * @return true if successful.   */  public boolean mkdir() throws IOException  {    return getWrappedPath().mkdir();  }  /**   * Creates the directory named by this path and any parent directories.   * @return true if successful.   */  public boolean mkdirs() throws IOException  {    return getWrappedPath().mkdirs();  }  /**   * Removes the file or directory named by this path.   * @return true if successful.   */  public boolean remove() throws IOException  {    return getWrappedPath().remove();  }  /**   * Removes the all files and directories below this path.   *   * @return true if successful.   */  public boolean removeAll() throws IOException  {    return getWrappedPath().removeAll();  }  /**   * Renames the file or directory to the name given by the path.   * @return true if successful   */  public boolean renameTo(Path path) throws IOException  {    return getWrappedPath().renameTo(path);  }  /**   * Creates a restricted root, like the Unix chroot call.   * Restricted roots cannot access schemes, so file:/etc/passwd cannot   * be used.   *   * <p>createRoot is useful for restricting JavaScript scripts without   * resorting to the dreadfully slow security manager.   */  public Path createRoot()  {    return getWrappedPath().createRoot();  }  public Path createRoot(SchemeMap schemeMap)  {    return getWrappedPath().createRoot(schemeMap);  }  /**   * Binds the context to the current path.  Later lookups will return   * the new context instead of the current path.  Essentially, this is a   * software symbolic link.   */  public void bind(Path context)  {    getWrappedPath().bind(context);  }  /**   * unbinds a link.   */  public void unbind()  {    getWrappedPath().unbind();  }  /**   * Gets the object at the path.  Normal filesystems will generally   * typically return null.   *   * <p>A bean filesystem or a mime-type aware filesystem could deserialize   * the contents of the file.   */  public Object getValue() throws Exception  {    return getWrappedPath().getValue();  }  /**   * Sets the object at the path.   *   * <p>Normal filesystems will generally do nothing. However, a bean   * filesystem or a mime-type aware filesystem could serialize the object   * and store it.   */  public void setValue(Object obj) throws Exception  {    getWrappedPath().setValue(obj);  }  /**   * Gets an attribute of the object.   */  public Object getAttribute(String name) throws IOException  {    return getWrappedPath().getAttribute(name);  }  /**   * Returns a iterator of all attribute names set for this object.   * @return null if path has no attributes.   */  public Iterator getAttributeNames() throws IOException  {    return getWrappedPath().getAttributeNames();  }  /**   * Opens a resin ReadWritePair for reading and writing.   *   * <p>A chat channel, for example, would open its socket using this   * interface.   */  public ReadWritePair openReadWrite() throws IOException  {    return getWrappedPath().openReadWrite();  }  /**   * Opens a resin ReadWritePair for reading and writing.   *   * <p>A chat channel, for example, would open its socket using this   * interface.   *   * @param is pre-allocated ReadStream to be initialized   * @param os pre-allocated WriteStream to be initialized   */  public void openReadWrite(ReadStream is, WriteStream os) throws IOException  {    getWrappedPath().openReadWrite(is, os);  }  /**   * Opens a resin stream for appending.   */  public WriteStream openAppend() throws IOException  {    return getWrappedPath().openAppend();  }  /**   * Opens a random-access stream.   */  public RandomAccessStream openRandomAccess() throws IOException  {    return getWrappedPath().openRandomAccess();  }  /**   * Creates the file named by this Path and returns true if the   * file is new.   */  public boolean createNewFile() throws IOException  {    return getWrappedPath().createNewFile();  }  /**   * Creates a unique temporary file as a child of this directory.   *   * @param prefix filename prefix   * @param suffix filename suffix, defaults to .tmp   * @return Path to the new file.   */  public Path createTempFile(String prefix, String suffix) throws IOException  {    return getWrappedPath().createTempFile(prefix, suffix);  }  /**   * Utility to write the contents of this path to the destination stream.   *   * @param os destination stream.   */  public void writeToStream(OutputStream os)    throws IOException  {    getWrappedPath().writeToStream(os);  }  /**   * Utility to write the contents of this path to the destination stream.   *   * @param os destination stream.   */  public void writeToStream(OutputStreamWithBuffer os)    throws IOException  {    getWrappedPath().writeToStream(os);  }  /**   * Returns the crc64 code.   */  public long getCrc64()  {    return getWrappedPath().getCrc64();  }  /**   * Returns the object at this path.  Normally, only paths like JNDI   * will support this.   */  public Object getObject()    throws IOException  {    return getWrappedPath().getObject();  }  /**   * Sets the object at this path.  Normally, only paths like JNDI   * will support this.   */  public void setObject(Object obj)    throws IOException  {    getWrappedPath().setObject(obj);  }  public long getInode()  {    return getWrappedPath().getInode();  }  public boolean isExecutable()  {    return getWrappedPath().isExecutable();  }  public boolean setExecutable(boolean isExecutable)  {    return getWrappedPath().setExecutable(isExecutable);  }  public int getGroup()  {    return getWrappedPath().getGroup();  }  public boolean changeGroup(int gid)    throws IOException  {    return getWrappedPath().changeGroup(gid);  }  public boolean changeGroup(String groupName)    throws IOException  {    return getWrappedPath().changeGroup(groupName);  }  public int getOwner()  {    return getWrappedPath().getOwner();  }  public boolean changeOwner(int uid)    throws IOException  {    return getWrappedPath().changeOwner(uid);  }  public boolean changeOwner(String ownerName)    throws IOException  {    return getWrappedPath().changeOwner(ownerName);  }  public long getDiskSpaceFree()  {    return getWrappedPath().getDiskSpaceFree();  }  public long getDiskSpaceTotal()  {    return getWrappedPath().getDiskSpaceTotal();  }  public int hashCode()  {    return getWrappedPath().hashCode();  }  public boolean equals(Object o)  {    return o.equals(getWrappedPath());  }  public String toString()  {    return getWrappedPath().toString();  }  public StreamImpl openReadImpl() throws IOException  {    return getWrappedPath().openReadImpl();  }  public StreamImpl openWriteImpl() throws IOException  {    return getWrappedPath().openWriteImpl();  }  public StreamImpl openReadWriteImpl() throws IOException  {    return getWrappedPath().openReadWriteImpl();  }  public StreamImpl openAppendImpl() throws IOException  {    return getWrappedPath().openAppendImpl();  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?