comparison servlet/src/digilib/io/Directory.java @ 282:87dca7119596

Servlet version 1.22b1 - more fast searching (hopefully all working now) - some simple synchronisation - some reshuffling of methods to eliminate cruft
author robcast
date Fri, 15 Oct 2004 16:59:47 +0200
parents b21915a3fc24
children 90bab835fc25
comparison
equal deleted inserted replaced
281:60a064f27d25 282:87dca7119596
33 public class Directory { 33 public class Directory {
34 34
35 protected Logger logger = Logger.getLogger(this.getClass()); 35 protected Logger logger = Logger.getLogger(this.getClass());
36 36
37 /** File object pointing to the directory */ 37 /** File object pointing to the directory */
38 File dir = null; 38 protected File dir = null;
39 /** parent directory */ 39 /** parent directory */
40 Directory parent = null; 40 protected Directory parent = null;
41 /** list of filenames in the directory */ 41 /** list of filenames in the directory */
42 protected String[] list = null; 42 protected String[] list = null;
43 43
44 /** Default constructor. 44 /** Default constructor.
45 * 45 *
80 * 80 *
81 * @return 81 * @return
82 */ 82 */
83 public boolean readDir() { 83 public boolean readDir() {
84 if (dir != null) { 84 if (dir != null) {
85 logger.debug("start reading dir"); 85 logger.debug("reading dir: "+dir.getPath());
86 list = dir.list(); 86 list = dir.list();
87 Arrays.sort(list); 87 Arrays.sort(list);
88 logger.debug("done reading dir"); 88 logger.debug(" done");
89 } 89 }
90 return (list != null); 90 return (list != null);
91 } 91 }
92 92
93 /** 93 /**