Expand description
File-level utilities split by concern:
- [
path]: filesystem metadata, glob exclusion, extension/name predicates - [
encoding]: byte-to-text decoding and “looks like text” heuristics - [
format_sniff]: magic-byte and container-format detection - [
classify]: mime type and file-info classification surface - [
extract]: text extraction for license/copyright detection - [
image_metadata]: EXIF/XMP image metadata text extraction - [
pdf]: bounded PDF text extraction
The public API is re-exported here so existing crate::utils::file::*
paths continue to resolve unchanged.
Structs§
Enums§
Functions§
- classify_
file_ info - decode_
bytes_ to_ string - Decode a byte buffer to a String, trying UTF-16 first when the byte shape strongly suggests it, then UTF-8, then Latin-1.
- detect_
mime_ type - extract_
printable_ strings - extract_
text_ for_ detection - get_
creation_ date - Get the last modified date of a file as a
YYYY-MM-DDstring. - is_
path_ excluded - Check if a path should be excluded based on a list of glob patterns.