file_rw
file_rw is a Rust crate for high-performance, memory-mapped file I/O utilities.
Features
- High-performance file reading and writing capabilities
- Memory-mapped files for efficient access and manipulation
- High-level, efficient abstractions of common operations on file contents
Installation
You can include the crate in your Rust project by either:
- Adding the following to your
Cargo.tomlfile:
[]
= "0.4.5"
- Running the following Cargo command to automatically do so:
Modules
file: File operationsread: File reading capabilitieswrite: File writing capabilities
Re-exports
The crate re-exports the FileReader and FileWriter structs for external use. These structs contain the aforementioned utilities.
Examples
use ;
use tempdir;
let tempdir = tempdir.unwrap;
let tempdir_path = tempdir.path;
let test_path = tempdir_path.join;
let mut writer = open.unwrap;
writer.append;
assert_eq!;
writer.overwrite;
assert_eq!;
writer.write;
assert_eq!;
writer.find_replace_nth.unwrap;
assert_eq!;
writer.find_replace.unwrap;
assert_eq!;
writer.find_replace.unwrap;
assert_eq!;
writer.find_replace_all.unwrap;
assert_eq!;
writer.find_replace.unwrap;
assert_eq!;
let reader = writer.as_reader.unwrap;
let content = reader.read_to_string;
assert_eq!;