fsdirectory.html

来自「 Lucene是apache软件基金会[4] jakarta项目组的一个子项目」· HTML 代码 · 共 892 行 · 第 1/4 页

HTML
892
字号
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="setDisableLocks(boolean)"><!-- --></A><H3>
setDisableLocks</H3>
<PRE>
public static void <B>setDisableLocks</B>(boolean&nbsp;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>&nbsp;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>&nbsp;path,                                       <A HREF="../../../../org/apache/lucene/store/LockFactory.html" title="class in org.apache.lucene.store">LockFactory</A>&nbsp;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>&nbsp;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>&nbsp;file,                                       <A HREF="../../../../org/apache/lucene/store/LockFactory.html" title="class in org.apache.lucene.store">LockFactory</A>&nbsp;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>&nbsp;path,                                       boolean&nbsp;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>&nbsp;<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>&nbsp;file,                                       boolean&nbsp;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>&nbsp;<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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;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>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?