incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: incubator-ftpserver/src/java/org/apache/ftpserver/filesystem OSVirtualFileObject.java
Date Fri, 09 Sep 2005 11:25:55 GMT
rana_b      2005/09/09 04:25:55

  Modified:    src/java/org/apache/ftpserver/filesystem
                        OSVirtualFileObject.java
  Log:
  native file system used
  
  Revision  Changes    Path
  1.2       +17 -7     incubator-ftpserver/src/java/org/apache/ftpserver/filesystem/OSVirtualFileObject.java
  
  Index: OSVirtualFileObject.java
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/src/java/org/apache/ftpserver/filesystem/OSVirtualFileObject.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OSVirtualFileObject.java	7 Sep 2005 05:05:35 -0000	1.1
  +++ OSVirtualFileObject.java	9 Sep 2005 11:25:54 -0000	1.2
  @@ -16,8 +16,6 @@
    */
   package org.apache.ftpserver.filesystem;
   
  -import org.apache.ftpserver.ftplet.FileObject;
  -
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.FileOutputStream;
  @@ -26,6 +24,8 @@
   import java.io.OutputStream;
   import java.io.RandomAccessFile;
   
  +import org.apache.ftpserver.ftplet.FileObject;
  +
   /**
    * Operating system file.  
    * 
  @@ -35,11 +35,17 @@
   class OSVirtualFileObject implements FileObject {
   
       private File m_file;
  -    private String m_rootDir;
       private boolean m_writePermission;
       
  +    // root directory will be always absolute (canonical name) and
  +    // the path separator will be always '/'. The root directory
  +    // will always end with '/'.
  +    private String m_rootDir;
  +    
  +    
       /**
  -     * Protected constructor - used only in the <code>OSVirtualFileSystemView</code>.
  +     * Protected constructor - used only in the 
  +     * <code>OSVirtualFileSystemView</code>.
        */
       protected OSVirtualFileObject(File file, String rootDir, boolean writePerm) {
           m_file = file;
  @@ -48,7 +54,11 @@
       }
   
       /**
  -     * Get the fully qualified name.
  +     * Get the fully qualified name. Here the name will be 
  +     * always with respect to the user root. If the file is 
  +     * a directory, the last character will never be '/' except 
  +     * the root directory where '/' will be returned. The first 
  +     * character will always be '/'.
        */
       public String getFullName() {
           String virtualFileStr = null;
  @@ -277,7 +287,7 @@
       /**
        * Normalize separate characher. Separate character should be '/' always.
        */
  -    public static String normalizeSeparateChar(String pathName) {   
  +    public final static String normalizeSeparateChar(String pathName) {   
          pathName = pathName.replace(File.separatorChar, '/');
          pathName = pathName.replace('\\', '/');
          return pathName;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message