You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ad...@apache.org on 2002/10/24 04:01:52 UTC

cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/local LocalFile.java

adammurdoch    2002/10/23 19:01:52

  Modified:    vfs/src/java/org/apache/commons/vfs/provider/local
                        LocalFile.java
  Log:
  Add support to local files for last-modified time.
  
  Revision  Changes    Path
  1.6       +18 -0     jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/local/LocalFile.java
  
  Index: LocalFile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/local/LocalFile.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LocalFile.java	23 Oct 2002 11:59:41 -0000	1.5
  +++ LocalFile.java	24 Oct 2002 02:01:52 -0000	1.6
  @@ -67,6 +67,7 @@
   import org.apache.commons.vfs.FileSystemException;
   import org.apache.commons.vfs.FileType;
   import org.apache.commons.vfs.provider.AbstractFileObject;
  +import org.apache.commons.vfs.provider.DefaultFileContent;
   
   /**
    * A file object implementation which uses direct file access.
  @@ -175,6 +176,23 @@
       protected boolean doIsReadable() throws FileSystemException
       {
           return file.canRead();
  +    }
  +
  +    /**
  +     * Gets the last modified time of this file.
  +     */
  +    protected long doGetLastModifiedTime() throws FileSystemException
  +    {
  +        return file.lastModified();
  +    }
  +
  +    /**
  +     * Sets the last modified time of this file.
  +     */
  +    protected void doSetLastModifiedTime( final long modtime )
  +        throws FileSystemException
  +    {
  +        file.setLastModified( modtime );
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>