cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/util IOUtils.java
Date Wed, 21 Feb 2001 14:54:36 GMT
bloritsch    01/02/21 06:54:36

  Modified:    src/org/apache/cocoon/util Tag: xml-cocoon2 IOUtils.java
  Log:
  Preparing for change to use context sensitive paths.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.10  +12 -1     xml-cocoon/src/org/apache/cocoon/util/Attic/IOUtils.java
  
  Index: IOUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/util/Attic/IOUtils.java,v
  retrieving revision 1.1.2.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- IOUtils.java	2000/12/11 15:06:12	1.1.2.9
  +++ IOUtils.java	2001/02/21 14:54:35	1.1.2.10
  @@ -24,7 +24,7 @@
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.9 $ $Date: 2000/12/11 15:06:12 $
  + * @version CVS $Revision: 1.1.2.10 $ $Date: 2001/02/21 14:54:35 $
    */
   public class IOUtils {
   
  @@ -199,6 +199,17 @@
         LogKit.getLoggerFor("cocoon").debug("IOUtils.getFullFilename", e);
         return file.getAbsolutePath();
       }
  +  }
  +
  +  /**
  +   * Return the path within a base directory
  +   */
  +  public static String getContextFilePath(String contextDir, String filePath) {
  +      if (filePath.startsWith(contextDir)) {
  +          return filePath.substring(contextDir.length());
  +      }
  +
  +      return filePath;
     }
   
     /**
  
  
  

Mime
View raw message