pub struct FileEntry {
pub path: PathBuf,
pub size: u64,
pub is_binary: bool,
}Expand description
A discovered file entry with lazy content loading.
Fields§
§path: PathBufAbsolute path to the file.
size: u64File size in bytes.
is_binary: boolWhether the file was detected as binary.
Implementations§
Source§impl FileEntry
impl FileEntry
Sourcepub fn content(&self) -> Result<FileContent>
pub fn content(&self) -> Result<FileContent>
Sourcepub fn content_chunks(&self) -> Result<FileContentChunks>
pub fn content_chunks(&self) -> Result<FileContentChunks>
Read the file content incrementally in bounded chunks.
§Errors
Returns an error if the file cannot be opened.
Sourcepub fn content_str(&self) -> Result<String>
pub fn content_str(&self) -> Result<String>
Read the file content as a UTF-8 string.
§Errors
Returns an error if the file cannot be read or contains invalid UTF-8.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileEntry
impl RefUnwindSafe for FileEntry
impl Send for FileEntry
impl Sync for FileEntry
impl Unpin for FileEntry
impl UnsafeUnpin for FileEntry
impl UnwindSafe for FileEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more