You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by st...@apache.org on 2004/07/16 18:35:39 UTC

cvs commit: jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/local FileUtil.java LocalFileSystem.java

stefan      2004/07/16 09:35:39

  Modified:    proposals/jcrri/src/org/apache/slide/jcr/fs
                        BasedFileSystem.java FileSystem.java
                        FileSystemException.java FileSystemPathUtil.java
                        FileSystemResource.java
               proposals/jcrri/src/org/apache/slide/jcr/fs/dav
                        DavFileSystem.java DavResourceOutputStream.java
               proposals/jcrri/src/org/apache/slide/jcr/fs/local
                        FileUtil.java LocalFileSystem.java
  Log:
  jcrri
  
  Revision  Changes    Path
  1.4       +0 -0      jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/BasedFileSystem.java
  
  Index: BasedFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/BasedFileSystem.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  
  
  
  1.9       +8 -4      jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/FileSystem.java
  
  Index: FileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/FileSystem.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- FileSystem.java	22 Jun 2004 18:02:48 -0000	1.8
  +++ FileSystem.java	16 Jul 2004 16:35:39 -0000	1.9
  @@ -40,10 +40,14 @@
    */
   public interface FileSystem {
   
  -    /** File separator */
  +    /**
  +     * File separator
  +     */
       public final static String SEPARATOR = "/";
   
  -    /** File separator character */
  +    /**
  +     * File separator character
  +     */
       public final static char SEPARATOR_CHAR = '/';
   
       /**
  
  
  
  1.9       +0 -0      jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/FileSystemException.java
  
  Index: FileSystemException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/FileSystemException.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  
  
  
  1.10      +14 -12    jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/FileSystemPathUtil.java
  
  Index: FileSystemPathUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/FileSystemPathUtil.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FileSystemPathUtil.java	22 Jun 2004 18:02:48 -0000	1.9
  +++ FileSystemPathUtil.java	16 Jul 2004 16:35:39 -0000	1.10
  @@ -148,27 +148,29 @@
   
       /**
        * Returns the parent directory of the specified <code>path</code>.
  +     *
        * @param path a file system path denoting a directory or a file.
        * @return the parent directory.
        */
       public static String getParentDir(String path) {
  -        int pos = path.lastIndexOf(FileSystem.SEPARATOR_CHAR);
  -        if (pos > 0) {
  -            return path.substring(0, pos);
  -        }
  -        return FileSystem.SEPARATOR;
  +	int pos = path.lastIndexOf(FileSystem.SEPARATOR_CHAR);
  +	if (pos > 0) {
  +	    return path.substring(0, pos);
  +	}
  +	return FileSystem.SEPARATOR;
       }
   
       /**
        * Returns the name of the specified <code>path</code>.
  +     *
        * @param path a file system path denoting a directory or a file.
        * @return the name.
        */
       public static String getName(String path) {
  -        int pos = path.lastIndexOf(FileSystem.SEPARATOR_CHAR);
  -        if (pos != -1) {
  -            return path.substring(pos + 1);
  -        }
  -        return path;
  +	int pos = path.lastIndexOf(FileSystem.SEPARATOR_CHAR);
  +	if (pos != -1) {
  +	    return path.substring(pos + 1);
  +	}
  +	return path;
       }
   }
  
  
  
  1.6       +14 -9     jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/FileSystemResource.java
  
  Index: FileSystemResource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/FileSystemResource.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FileSystemResource.java	2 Jul 2004 16:24:23 -0000	1.5
  +++ FileSystemResource.java	16 Jul 2004 16:35:39 -0000	1.6
  @@ -23,9 +23,9 @@
    */
   package org.apache.slide.jcr.fs;
   
  +import java.io.IOException;
   import java.io.InputStream;
   import java.io.OutputStream;
  -import java.io.IOException;
   
   /**
    * A <code>FileSystemResource</code> represents a resource (i.e. file) in a
  @@ -43,8 +43,8 @@
       /**
        * Creates a new <code>FileSystemResource</code>
        *
  -     * @param fs    the <code>FileSystem</code> where the resource is located
  -     * @param path  the path of the resource in the <code>FileSystem</code>
  +     * @param fs   the <code>FileSystem</code> where the resource is located
  +     * @param path the path of the resource in the <code>FileSystem</code>
        */
       public FileSystemResource(FileSystem fs, String path) {
   	if (fs == null) {
  @@ -60,6 +60,7 @@
   
       /**
        * Returns the <code>FileSystem</code> where this resource is located.
  +     *
        * @return the <code>FileSystem</code> where this resource is located.
        */
       public FileSystem getFileSystem() {
  @@ -68,6 +69,7 @@
   
       /**
        * Returns the path of this resource.
  +     *
        * @return the path of this resource.
        */
       public String getPath() {
  @@ -76,14 +78,16 @@
   
       /**
        * Returns the parent directory of this resource.
  +     *
        * @return the parent directory.
        */
       public String getParentDir() {
  -        return FileSystemPathUtil.getParentDir(path);
  +	return FileSystemPathUtil.getParentDir(path);
       }
   
       /**
        * Returns the name of this resource.
  +     *
        * @return the name.
        */
       public String getName() {
  @@ -93,6 +97,7 @@
       /**
        * Creates the parent directory of this resource, including any necessary
        * but nonexistent parent directories.
  +     *
        * @throws FileSystemException
        */
       public void makeParentDirs() throws FileSystemException {
  @@ -126,11 +131,11 @@
       /**
        * Spools this resource to the given output stream.
        *
  -     * @see FileSystem#getInputStream
        * @param out output stream where to spool the resource
        * @throws FileSystemException if the input stream for this resource could
  -     * not be obtained
  -     * @throws IOException if an error occurs while while spooling
  +     *                             not be obtained
  +     * @throws IOException         if an error occurs while while spooling
  +     * @see FileSystem#getInputStream
        */
       public void spool(OutputStream out) throws FileSystemException, IOException {
   	InputStream in = fs.getInputStream(path);
  
  
  
  1.12      +0 -0      jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/dav/DavFileSystem.java
  
  Index: DavFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/dav/DavFileSystem.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  
  
  
  1.9       +0 -0      jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/dav/DavResourceOutputStream.java
  
  Index: DavResourceOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/dav/DavResourceOutputStream.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  
  
  
  1.9       +0 -0      jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/local/FileUtil.java
  
  Index: FileUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/local/FileUtil.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  
  
  
  1.11      +0 -0      jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/local/LocalFileSystem.java
  
  Index: LocalFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/local/LocalFileSystem.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  
  
  

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