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 ZipFileSystem.java
Date Mon, 14 Apr 2003 01:09:25 GMT
adammurdoch    2003/04/13 18:09:25

  Modified:    vfs/src/java/org/apache/commons/vfs Capability.java
               vfs/src/java/org/apache/commons/vfs/impl
                        VirtualFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/ftp
                        FtpFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/local
                        LocalFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/smb
                        SmbFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/webdav
                        WebdavFileObject.java WebDavFileSystem.java
               vfs/src/java/org/apache/commons/vfs/provider/zip
                        ZipFileSystem.java
  Log:
  - Split LAST_MODIFIED capability into GET_LAST_MODIFIED and SET_LAST_MODIFIED.
  - Added support for gettting last modified time of webdav files.
  
  Patch submitted by Sylwester Lachiewicz.
  
  Revision  Changes    Path
  1.5       +9 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/Capability.java
  
  Index: Capability.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/Capability.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Capability.java	12 Feb 2003 07:56:09 -0000	1.4
  +++ Capability.java	14 Apr 2003 01:09:25 -0000	1.5
  @@ -72,8 +72,15 @@
       /** File attributes are supported. */
       public static final Capability ATTRIBUTES = new Capability( "ATTRIBUTES" );
   
  -    /** File last-modified time is supported. */
  +    /** File last-modified time is supported.
  +     * @deprecated use GET_LAST_MODIFIED and SET_LAST_MODIFIED */
       public static final Capability LAST_MODIFIED = new Capability( "LAST_MODIFIED" );
  +
  +    /** File get last-modified time is supported. */
  +    public static final Capability GET_LAST_MODIFIED = new Capability( "GET_LAST_MODIFIED"
);
  +
  +    /** File set last-modified time is supported. */
  +    public static final Capability SET_LAST_MODIFIED = new Capability( "SET_LAST_MODIFIED"
);
   
       /** File content signing is supported. */
       public static final Capability SIGNING = new Capability( "SIGNING" );
  
  
  
  1.9       +3 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/impl/VirtualFileSystem.java
  
  Index: VirtualFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/impl/VirtualFileSystem.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- VirtualFileSystem.java	21 Feb 2003 13:16:39 -0000	1.8
  +++ VirtualFileSystem.java	14 Apr 2003 01:09:25 -0000	1.9
  @@ -97,7 +97,8 @@
           caps.add( Capability.DELETE );
           caps.add( Capability.GET_TYPE );
           caps.add( Capability.JUNCTIONS );
  -        caps.add( Capability.LAST_MODIFIED );
  +        caps.add( Capability.GET_LAST_MODIFIED );
  +        caps.add( Capability.SET_LAST_MODIFIED );
           caps.add( Capability.LIST_CHILDREN );
           caps.add( Capability.READ_CONTENT );
           caps.add( Capability.SIGNING );
  
  
  
  1.21      +2 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
  
  Index: FtpFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- FtpFileSystem.java	14 Mar 2003 03:47:09 -0000	1.20
  +++ FtpFileSystem.java	14 Apr 2003 01:09:25 -0000	1.21
  @@ -130,7 +130,8 @@
           caps.add( Capability.GET_TYPE );
           caps.add( Capability.LIST_CHILDREN );
           caps.add( Capability.READ_CONTENT );
  -        caps.add( Capability.LAST_MODIFIED );
  +        caps.add( Capability.SET_LAST_MODIFIED );
  +        caps.add( Capability.GET_LAST_MODIFIED );
           caps.add( Capability.URI );
           caps.add( Capability.WRITE_CONTENT );
       }
  
  
  
  1.16      +2 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/local/LocalFileSystem.java
  
  Index: LocalFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/local/LocalFileSystem.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- LocalFileSystem.java	21 Feb 2003 13:09:00 -0000	1.15
  +++ LocalFileSystem.java	14 Apr 2003 01:09:25 -0000	1.16
  @@ -103,7 +103,8 @@
           caps.add( Capability.CREATE );
           caps.add( Capability.DELETE );
           caps.add( Capability.GET_TYPE );
  -        caps.add( Capability.LAST_MODIFIED );
  +        caps.add( Capability.GET_LAST_MODIFIED );
  +        caps.add( Capability.SET_LAST_MODIFIED );
           caps.add( Capability.LIST_CHILDREN );
           caps.add( Capability.READ_CONTENT );
           caps.add( Capability.URI );
  
  
  
  1.16      +1 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/smb/SmbFileSystem.java
  
  Index: SmbFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/smb/SmbFileSystem.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- SmbFileSystem.java	13 Apr 2003 00:14:58 -0000	1.15
  +++ SmbFileSystem.java	14 Apr 2003 01:09:25 -0000	1.16
  @@ -93,7 +93,7 @@
           caps.add( Capability.CREATE );
           caps.add( Capability.DELETE );
           caps.add( Capability.GET_TYPE );
  -        caps.add( Capability.LAST_MODIFIED );
  +        caps.add( Capability.GET_LAST_MODIFIED );
           caps.add( Capability.LIST_CHILDREN );
           caps.add( Capability.READ_CONTENT );
           caps.add( Capability.URI );
  
  
  
  1.7       +9 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java
  
  Index: WebdavFileObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WebdavFileObject.java	14 Mar 2003 03:48:14 -0000	1.6
  +++ WebdavFileObject.java	14 Apr 2003 01:09:25 -0000	1.7
  @@ -248,4 +248,12 @@
               }
           }
       }
  +
  +    /**
  +     * Returns the last modified time of this file.  Is only called if
  +     * {@link #doGetType} does not return {@link FileType#IMAGINARY}.
  +     */
  +    protected long doGetLastModifiedTime() throws Exception {
  +        return resource.getGetLastModified();
  +    }
   }
  
  
  
  1.5       +2 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/webdav/WebDavFileSystem.java
  
  Index: WebDavFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/webdav/WebDavFileSystem.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WebDavFileSystem.java	21 Feb 2003 13:08:59 -0000	1.4
  +++ WebDavFileSystem.java	14 Apr 2003 01:09:25 -0000	1.5
  @@ -97,6 +97,7 @@
           caps.add( Capability.READ_CONTENT );
           caps.add( Capability.URI );
           caps.add( Capability.WRITE_CONTENT );
  +        caps.add( Capability.GET_LAST_MODIFIED );
       }
   
       /**
  
  
  
  1.22      +1 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystem.java
  
  Index: ZipFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystem.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- ZipFileSystem.java	21 Feb 2003 13:08:59 -0000	1.21
  +++ ZipFileSystem.java	14 Apr 2003 01:09:25 -0000	1.22
  @@ -183,7 +183,7 @@
        */
       protected void addCapabilities( final Collection caps )
       {
  -        caps.add( Capability.LAST_MODIFIED );
  +        caps.add( Capability.GET_LAST_MODIFIED );
           caps.add( Capability.GET_TYPE );
           caps.add( Capability.LIST_CHILDREN );
           caps.add( Capability.READ_CONTENT );
  
  
  

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


Mime
View raw message