1 package org.apache.lucene.store; 2 3 18 19 import java.io.IOException ; 20 21 34 public abstract class Directory { 35 36 public abstract String [] list() 37 throws IOException ; 38 39 40 public abstract boolean fileExists(String name) 41 throws IOException ; 42 43 44 public abstract long fileModified(String name) 45 throws IOException ; 46 47 48 public abstract void touchFile(String name) 49 throws IOException ; 50 51 52 public abstract void deleteFile(String name) 53 throws IOException ; 54 55 58 public abstract void renameFile(String from, String to) 59 throws IOException ; 60 61 62 public abstract long fileLength(String name) 63 throws IOException ; 64 65 66 public OutputStream createFile(String name) throws IOException { 67 return (OutputStream)createOutput(name); 68 } 69 70 72 public IndexOutput createOutput(String name) throws IOException { 73 return (IndexOutput)createFile(name); 76 } 77 78 79 public InputStream openFile(String name) throws IOException { 80 return (InputStream)openInput(name); 81 } 82 83 84 public IndexInput openInput(String name) 85 throws IOException { 86 return (IndexInput)openFile(name); 89 } 90 91 94 public abstract Lock makeLock(String name); 95 96 97 public abstract void close() 98 throws IOException ; 99 } 100 | Popular Tags |