fsdirectory.html

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

HTML
892
字号
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the length in bytes of a file in the directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#fileModified(java.io.File, java.lang.String)">fileModified</A></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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the time the named file was last modified.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#fileModified(java.lang.String)">fileModified</A></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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the time the named file was last modified.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#getDirectory(java.io.File)">getDirectory</A></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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the directory instance for the named location.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#getDirectory(java.io.File, boolean)">getDirectory</A></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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use IndexWriter's create flag, instead, to create a new index.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#getDirectory(java.io.File, org.apache.lucene.store.LockFactory)">getDirectory</A></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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the directory instance for the named location.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#getDirectory(java.lang.String)">getDirectory</A></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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the directory instance for the named location.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#getDirectory(java.lang.String, boolean)">getDirectory</A></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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use IndexWriter's create flag, instead, to create a new index.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../org/apache/lucene/store/FSDirectory.html" title="class in org.apache.lucene.store">FSDirectory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#getDirectory(java.lang.String, org.apache.lucene.store.LockFactory)">getDirectory</A></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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the directory instance for the named location.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#getDisableLocks()">getDisableLocks</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether Lucene's use of lock files is disabled.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#getFile()">getFile</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#getLockID()">getLockID</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a string identifier that uniquely differentiates this Directory instance from other Directory instances.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#list()">list</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array of strings, one for each Lucene index file in the directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/lucene/store/IndexInput.html" title="class in org.apache.lucene.store">IndexInput</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#openInput(java.lang.String)">openInput</A></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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a stream reading an existing file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#renameFile(java.lang.String, java.lang.String)">renameFile</A></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;from,           <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;to)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I></I>&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#setDisableLocks(boolean)">setDisableLocks</A></B>(boolean&nbsp;doDisableLocks)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set whether Lucene's use of lock files is disabled.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For debug output.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/store/FSDirectory.html#touchFile(java.lang.String)">touchFile</A></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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the modified time of an existing file to now.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.lucene.store.Directory"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class org.apache.lucene.store.<A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/lucene/store/Directory.html#clearLock(java.lang.String)">clearLock</A>, <A HREF="../../../../org/apache/lucene/store/Directory.html#copy(org.apache.lucene.store.Directory, org.apache.lucene.store.Directory, boolean)">copy</A>, <A HREF="../../../../org/apache/lucene/store/Directory.html#getLockFactory()">getLockFactory</A>, <A HREF="../../../../org/apache/lucene/store/Directory.html#makeLock(java.lang.String)">makeLock</A>, <A HREF="../../../../org/apache/lucene/store/Directory.html#setLockFactory(org.apache.lucene.store.LockFactory)">setLockFactory</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="LOCK_DIR"><!-- --></A><H3>
LOCK_DIR</H3>
<PRE>
public static final <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>LOCK_DIR</B></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>As of 2.1, <code>LOCK_DIR</code> is unused because the write.lock is now stored by default in the index directory.  If you really want to store locks elsewhere you can create your own <A HREF="../../../../org/apache/lucene/store/SimpleFSLockFactory.html" title="class in org.apache.lucene.store"><CODE>SimpleFSLockFactory</CODE></A> (or <A HREF="../../../../org/apache/lucene/store/NativeFSLockFactory.html" title="class in org.apache.lucene.store"><CODE>NativeFSLockFactory</CODE></A>, etc.) passing in your preferred lock directory.  Then, pass this <code>LockFactory</code> instance to one of the <code>getDirectory</code> methods that take a <code>lockFactory</code> (for example, <A HREF="../../../../org/apache/lucene/store/FSDirectory.html#getDirectory(java.lang.String, org.apache.lucene.store.LockFactory)"><CODE>getDirectory(String, LockFactory)</CODE></A>).</I>
<P>
<DD>Directory specified by <code>org.apache.lucene.lockDir</code> or <code>java.io.tmpdir</code> system property.
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="FSDirectory()"><!-- --></A><H3>
FSDirectory</H3>
<PRE>
protected <B>FSDirectory</B>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">

⌨️ 快捷键说明

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