Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/util RenameableFileUpload.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: joist/java/org/joist/util RenameableFileUpload.java

Author dlr
Full name Daniel Rall
Date 2000-11-13 14:06:50 PST
Message User: dlr
  Date: 00/11/13 14:06:50

  Modified: java/org/joist/util RenameableFileUpload.java
  Log:
  Removed tab characters.
  
  Revision Changes Path
  1.7 +17 -17 joist/java/org/joist​/util/RenameableFile​Upload.java
  
  Index: RenameableFileUpload.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/util/Renameabl​eFileUpload.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RenameableFileUpload.java 2000/11/13 22:02:04 1.6
  +++ RenameableFileUpload.java 2000/11/13 22:06:50 1.7
  @@ -68,7 +68,7 @@
    * the file is on a different partition or physical disk.
    *
    * @author <a href="mailto:dlr@col​lab.net">Daniel L. Rall</a>
  - * @version $Id: RenameableFileUpload.java,v 1.6 2000/11/13 22:02:04 dlr Exp $
  + * @version $Id: RenameableFileUpload.java,v 1.7 2000/11/13 22:06:50 dlr Exp $
    *
    * Copyright (c) 2000 Collab.Net, Inc.
    */
  @@ -98,26 +98,26 @@
        * @param conn The JDBC connection to use.
        * @param mreq The MultipartRequest to use.
        * @param context The context of user interaction.
  - * @return The File objects the uploaded files were saved as.
  + * @return The File objects the uploaded files were saved as.
        */
       protected List processUploadedFiles (Connection conn, WebContext ctx,
                                            MultipartRequest mreq)
       {
  - List files = new ArrayList();
  + List files = new ArrayList();
   
  - // Iterate files, adding File objects corresponding to the destination
  + // Iterate files, adding File objects corresponding to the destination
           // path for each.
  - Enumeration fileNames = mreq.getFileNames();
  - for (File src, dest; fileNames.hasMoreElements(); )
  - {
  + Enumeration fileNames = mreq.getFileNames();
  + for (File src, dest; fileNames.hasMoreElements(); )
  + {
               src = mreq.getFile((String​)fileNames.nextEleme​nt());
  - dest = new File(getDestinationPath() + File.separator +
  - getSaveAsFileName(conn, ctx, src.getName()));
  - src.renameTo(dest);
  - files.add(dest);
  - }
  + dest = new File(getDestinationPath() + File.separator +
  + getSaveAsFileName(conn, ctx, src.getName()));
  + src.renameTo(dest);
  + files.add(dest);
  + }
   
  - return files;
  + return files;
       }
   
       /**
  @@ -127,11 +127,11 @@
        * @param conn The JDBC connection to use.
        * @param ctx The context of user interaction.
        * @param clntFname The client supplied file name.
  - * @return The name to save the file as.
  + * @return The name to save the file as.
        */
       protected abstract String getSaveAsFileName (Connection conn,
  - WebContext ctx,
  - String clntFname);
  + WebContext ctx,
  + String clntFname);
   
       /**
        * Returns the path of the directory to move files into while renaming
  @@ -142,6 +142,6 @@
        */
       protected String getDestinationPath ()
       {
  - return myProperties.getProp​erty("destDirectory"​);
  + return myProperties.getProp​erty("destDirectory"​);
       }
   }

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: joist/java/org/joist/util RenameableFileUpload.java dlr Daniel Rall 2000-11-13 14:06:50 PST
Messages per page: