Struct indexed_file::file::File [−][src]
pub struct File(_);
Expand description
A wrapper around std::fs::File
which implements ReadByLine
and holds an index of the
lines.
Implementations
Open a new indexed file.
Returns an error if the index is malformed, missing or an io error occurs
Open a non indexed file and generates the index.
Open a non indexed file and uses a custom index index
.
Expects the index to be properly built.
Creates a new File
using an existing _std::io::BufReader
and index
Trait Implementations
Returns the total amount of lines in the file without the lines used by the index.
Should read from the current position until the end of the line, omitting the \n
Write the index, followed by the files contents into writer
. A file generated using this
function will always be parsable by File::open
. Read more
Should return the offset to seek to given the line-index
Reads the given line and stores into buf
Do a binary search on ReadByLine
implementing Types, since it provides everything required
for binary search. Only works with sorted files Read more
Do a binary search by on ReadByLine
implementing Types, since it provides everything required
for binary search. Only works with sorted files Read more
Do a binary search on ReadByLine
implementing Types, since it provides everything required
for binary search. Only works with sorted files Read more