Skip to main content

build_binary_preview

Function build_binary_preview 

Source
pub fn build_binary_preview(
    path: &Path,
    metadata: Option<&Metadata>,
) -> PreviewContent
Expand description

Builds a PreviewContent::Binary describing path.

Reads metadata from the already-cached metadata if present, or performs a fresh fs::metadata call if not. Returns PreviewContent::Empty only if neither source works.