?? fsdirectory.html
字號:
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="setDisableLocks(boolean)"><!-- --></A><H3>
setDisableLocks</H3>
<PRE>
public static void <B>setDisableLocks</B>(boolean doDisableLocks)</PRE>
<DL>
<DD>Set whether Lucene's use of lock files is disabled. By default, lock files are enabled. They should only be disabled if the index is on a read-only medium like a CD-ROM.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getDisableLocks()"><!-- --></A><H3>
getDisableLocks</H3>
<PRE>
public static boolean <B>getDisableLocks</B>()</PRE>
<DL>
<DD>Returns whether Lucene's use of lock files is disabled.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if locks are disabled, false if locks are enabled.</DL>
</DD>
</DL>
<HR>
<A NAME="getDirectory(java.lang.String)"><!-- --></A><H3>
getDirectory</H3>
<PRE>
public static <A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A> <B>getDirectory</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Returns the directory instance for the named location.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>path</CODE> - the path to the directory.<DT><B>Returns:</B><DD>the FSDirectory for the named file.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getDirectory(java.lang.String, org.apache.lucene.store.LockFactory)"><!-- --></A><H3>
getDirectory</H3>
<PRE>
public static <A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A> <B>getDirectory</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path, <A HREF="../../../../org/apache/lucene/store/LockFactory.html" title="class in org.apache.lucene.store">LockFactory</A> lockFactory) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Returns the directory instance for the named location.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>path</CODE> - the path to the directory.<DD><CODE>lockFactory</CODE> - instance of <A HREF="../../../../org/apache/lucene/store/LockFactory.html" title="class in org.apache.lucene.store"><CODE>LockFactory</CODE></A> providing the locking implementation.<DT><B>Returns:</B><DD>the FSDirectory for the named file.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getDirectory(java.io.File)"><!-- --></A><H3>
getDirectory</H3>
<PRE>
public static <A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A> <B>getDirectory</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> file) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Returns the directory instance for the named location.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - the path to the directory.<DT><B>Returns:</B><DD>the FSDirectory for the named file.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getDirectory(java.io.File, org.apache.lucene.store.LockFactory)"><!-- --></A><H3>
getDirectory</H3>
<PRE>
public static <A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A> <B>getDirectory</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> file, <A HREF="../../../../org/apache/lucene/store/LockFactory.html" title="class in org.apache.lucene.store">LockFactory</A> lockFactory) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Returns the directory instance for the named location.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - the path to the directory.<DD><CODE>lockFactory</CODE> - instance of <A HREF="../../../../org/apache/lucene/store/LockFactory.html" title="class in org.apache.lucene.store"><CODE>LockFactory</CODE></A> providing the locking implementation.<DT><B>Returns:</B><DD>the FSDirectory for the named file.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getDirectory(java.lang.String, boolean)"><!-- --></A><H3>
getDirectory</H3>
<PRE>
public static <A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A> <B>getDirectory</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path, boolean create) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use IndexWriter's create flag, instead, to create a new index.</I>
<P>
<DD>Returns the directory instance for the named location.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>path</CODE> - the path to the directory.<DD><CODE>create</CODE> - if true, create, or erase any existing contents.<DT><B>Returns:</B><DD>the FSDirectory for the named file.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getDirectory(java.io.File, boolean)"><!-- --></A><H3>
getDirectory</H3>
<PRE>
public static <A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A> <B>getDirectory</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> file, boolean create) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use IndexWriter's create flag, instead, to create a new index.</I>
<P>
<DD>Returns the directory instance for the named location.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - the path to the directory.<DD><CODE>create</CODE> - if true, create, or erase any existing contents.<DT><B>Returns:</B><DD>the FSDirectory for the named file.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="list()"><!-- --></A><H3>
list</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>list</B>()</PRE>
<DL>
<DD>Returns an array of strings, one for each Lucene index file in the directory.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/lucene/store/Directory.html#list()">list</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="fileExists(java.lang.String)"><!-- --></A><H3>
fileExists</H3>
<PRE>
public boolean <B>fileExists</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE>
<DL>
<DD>Returns true iff a file with the given name exists.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/lucene/store/Directory.html#fileExists(java.lang.String)">fileExists</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="fileModified(java.lang.String)"><!-- --></A><H3>
fileModified</H3>
<PRE>
public long <B>fileModified</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE>
<DL>
<DD>Returns the time the named file was last modified.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/lucene/store/Directory.html#fileModified(java.lang.String)">fileModified</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="fileModified(java.io.File, java.lang.String)"><!-- --></A><H3>
fileModified</H3>
<PRE>
public static long <B>fileModified</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> directory, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE>
<DL>
<DD>Returns the time the named file was last modified.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="touchFile(java.lang.String)"><!-- --></A><H3>
touchFile</H3>
<PRE>
public void <B>touchFile</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE>
<DL>
<DD>Set the modified time of an existing file to now.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/lucene/store/Directory.html#touchFile(java.lang.String)">touchFile</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -