Skip to main content

Module file

Module file 

Source
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§

FileInfoClassification

Enums§

ExtractedTextKind

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-DD string.
is_path_excluded
Check if a path should be excluded based on a list of glob patterns.