Expand description
Raw file operations.
This module provides low-level file copying using raw disk reads, which can bypass some filesystem-level filters.
§Permissions
Raw reads typically require elevated privileges (administrator).
Without sufficient privileges, operations usually fail with
crate::Error::FileOperation.
§Path Requirements
Source paths must be absolute Windows drive paths (for example C:\\path\\file.txt).
Paths without a drive prefix are rejected as invalid parameters.
§Examples
use windows_erg::file;
file::raw_copy(
r"C:\\Windows\\System32\\drivers\\etc\\hosts",
r"C:\\Temp\\hosts.copy"
)?;use windows_erg::file::RawFile;
let mut raw = RawFile::builder()
.path(r"C:\\Windows\\System32\\drivers\\etc\\hosts")
.clusters_per_read(8)
.open()?;
raw.copy_to(r"C:\\Temp\\hosts.builder.copy")?;Structs§
- RawFile
- Low-level reader for file content through raw disk cluster reads.
- RawFile
Builder - Builder for opening
RawFilewith custom tuning parameters.
Functions§
- apply_
permissions - Apply a permission edit plan to a file target.
- builder
- Create a raw file builder.
- raw_
copy - Copy a file using raw disk reads.
- read_
security_ descriptor - Read a file security descriptor.
- write_
security_ descriptor - Write a file security descriptor.