Class CompoundFileDirectory
Class for accessing a compound stream.
This class implements a directory, but is limited to only read operations.
Directory methods that would normally modify data throw an exception.
All files belonging to a segment have the same name with varying extensions.
The extensions correspond to the different file formats used by the Codec.
When using the Compound File format these files are collapsed into a
single .cfs
file (except for the LiveDocsFormat, with a
corresponding .cfe
file indexing its sub-files.
Files:
.cfs
: An optional "virtual" file consisting of all the other
index files for systems that frequently run out of file handles..cfe
: The "virtual" compound file's entry table holding all
entries in the corresponding .cfs file.
Description:
Notes:
- FileCount indicates how many files are contained in this compound file.
The entry table that follows has that many entries.
- Each directory entry contains a long pointer to the start of this file's data
section, the files length, and a System.String with that file's name.
Note
This API is experimental and might change in incompatible ways in the next release.
Inheritance
System.Object
CompoundFileDirectory
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.dll
Syntax
public sealed class CompoundFileDirectory : BaseDirectory, IDisposable
Constructors
|
Improve this Doc
View Source
CompoundFileDirectory(Directory, String, IOContext, Boolean)
Declaration
public CompoundFileDirectory(Directory directory, string fileName, IOContext context, bool openForWrite)
Parameters
Type |
Name |
Description |
Directory |
directory |
|
System.String |
fileName |
|
IOContext |
context |
|
System.Boolean |
openForWrite |
|
Properties
|
Improve this Doc
View Source
Directory
Declaration
public Directory Directory { get; }
Property Value
|
Improve this Doc
View Source
Name
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
Methods
|
Improve this Doc
View Source
CreateOutput(String, IOContext)
Declaration
public override IndexOutput CreateOutput(string name, IOContext context)
Parameters
Type |
Name |
Description |
System.String |
name |
|
IOContext |
context |
|
Returns
Overrides
|
Improve this Doc
View Source
CreateSlicer(String, IOContext)
Declaration
public override Directory.IndexInputSlicer CreateSlicer(string name, IOContext context)
Parameters
Type |
Name |
Description |
System.String |
name |
|
IOContext |
context |
|
Returns
Overrides
|
Improve this Doc
View Source
DeleteFile(String)
Declaration
public override void DeleteFile(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Overrides
Exceptions
Type |
Condition |
System.NotSupportedException |
always: not supported by CFS
|
|
Improve this Doc
View Source
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Overrides
|
Improve this Doc
View Source
FileExists(String)
Returns true iff a file with the given name exists.
Declaration
[Obsolete("this method will be removed in 5.0")]
public override bool FileExists(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
FileLength(String)
Returns the length of a file in the directory.
Declaration
public override long FileLength(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Int64 |
|
Overrides
Exceptions
Type |
Condition |
System.IO.IOException |
if the file does not exist
|
|
Improve this Doc
View Source
ListAll()
Returns an array of strings, one for each file in the directory.
Declaration
public override string[] ListAll()
Returns
Type |
Description |
System.String[] |
|
Overrides
|
Improve this Doc
View Source
MakeLock(String)
Declaration
public override Lock MakeLock(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Overrides
Exceptions
Type |
Condition |
System.NotSupportedException |
always: not supported by CFS
|
|
Improve this Doc
View Source
OpenInput(String, IOContext)
Declaration
public override IndexInput OpenInput(string name, IOContext context)
Parameters
Type |
Name |
Description |
System.String |
name |
|
IOContext |
context |
|
Returns
Overrides
|
Improve this Doc
View Source
RenameFile(String, String)
Declaration
public void RenameFile(string from, string to)
Parameters
Type |
Name |
Description |
System.String |
from |
|
System.String |
to |
|
Exceptions
Type |
Condition |
System.NotSupportedException |
always: not supported by CFS
|
|
Improve this Doc
View Source
Sync(ICollection<String>)
Declaration
public override void Sync(ICollection<string> names)
Parameters
Type |
Name |
Description |
System.Collections.Generic.ICollection<System.String> |
names |
|
Overrides
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
Implements
System.IDisposable