commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip ZipFileObject.java
Date Thu, 31 Oct 2002 10:26:54 GMT
adammurdoch    2002/10/31 02:26:54

  Modified:    vfs/src/java/org/apache/commons/vfs/provider/zip
                        ZipFileObject.java
  Log:
  Support last-modified time for zip and jar files.
  
  Revision  Changes    Path
  1.7       +11 -0     jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileObject.java
  
  Index: ZipFileObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileObject.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ZipFileObject.java	23 Oct 2002 11:59:42 -0000	1.6
  +++ ZipFileObject.java	31 Oct 2002 10:26:54 -0000	1.7
  @@ -63,6 +63,7 @@
   import org.apache.commons.vfs.FileObject;
   import org.apache.commons.vfs.FileType;
   import org.apache.commons.vfs.provider.AbstractFileObject;
  +import org.apache.commons.vfs.provider.DefaultFileContent;
   
   /**
    * A file in a Zip file system.
  @@ -154,6 +155,16 @@
       protected long doGetContentSize()
       {
           return entry.getSize();
  +    }
  +
  +    /**
  +     * Called from {@link DefaultFileContent#getLastModifiedTime}.
  +     * The default is to just throw an exception so filesystems must
  +     * override it to use it.
  +     */
  +    protected long doGetLastModifiedTime() throws Exception
  +    {
  +        return entry.getTime();
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message