You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by bl...@apache.org on 2001/02/21 15:54:36 UTC
cvs commit: xml-cocoon/src/org/apache/cocoon/util IOUtils.java
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;
}
/**