You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by im...@apache.org on 2007/05/14 21:05:24 UTC
svn commit: r537951 -
/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
Author: imario
Date: Mon May 14 12:05:23 2007
New Revision: 537951
URL: http://svn.apache.org/viewvc?view=rev&rev=537951
Log:
VFS-155: implement missing methods - Thanks to Adam Heath for the patch!
Modified:
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
Modified: jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java?view=diff&rev=537951&r1=537950&r2=537951
==============================================================================
--- jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java (original)
+++ jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java Mon May 14 12:05:23 2007
@@ -23,7 +23,9 @@
import org.apache.commons.vfs.FileSystemException;
import org.apache.commons.vfs.FileType;
import org.apache.commons.vfs.FileContentInfo;
+import org.apache.commons.vfs.RandomAccessContent;
import org.apache.commons.vfs.util.WeakRefFileListener;
+import org.apache.commons.vfs.util.RandomAccessMode;
import java.io.InputStream;
import java.io.OutputStream;
@@ -368,5 +370,31 @@
protected FileContentInfo doGetContentInfo() throws Exception
{
return file.getContent().getContentInfo();
+ }
+
+ /**
+ * Renames the file.
+ */
+ protected void doRename(FileObject newFile)
+ throws Exception
+ {
+ file.moveTo(((DelegateFileObject) newFile).file);
+ }
+
+ /**
+ * Removes an attribute of this file.
+ */
+ protected void doRemoveAttribute(final String atttrName)
+ throws Exception
+ {
+ file.getContent().removeAttribute(atttrName);
+ }
+
+ /**
+ * Creates access to the file for random i/o.
+ */
+ protected RandomAccessContent doGetRandomAccessContent(final RandomAccessMode mode) throws Exception
+ {
+ return file.getContent().getRandomAccessContent(mode);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org