Skip to main content

Module import_check

Module import_check 

Source
Expand description

The duplicate check on import, after Eagle’s Duplicate File Alert.

Eagle finds an existing item with the same metadata key (see the Import chapter) and then compares the first 4,096,000 bytes of both files. falcon looks for items, not in the Trash, with the same size and extension, and compares the whole files by BLAKE3 hash, which is at least as strict. Eagle skips svg, tif, tiff and the formats its key leaves empty (bmp, tga, txt, and anything it can’t preview); falcon skips the same list and files without an extension.

What happens to a duplicate is the caller’s choice (the app asks): import it anyway, drop it, or use the existing item instead, which Library::use_existing_for_import does.

Constants§

UNCHECKED
Extensions the check leaves alone.

Functions§

is_checked
Whether files with extension ext (lowercase) are checked.
same_file
The id of the first candidate whose file has the same bytes as path.