Open dnutan opened 2 years ago
Most tools are written in C/C++ and similar, so integration can be problematic.
From Rust side, probably something like https://crates.io/crates/mime_guess can be used
For Rust, maybe something like mime2ext, infer (or tree_magic or tree_magic_mini) would help doing the job. Regards.
I think it would be a nice feature to be able to correct the file extension on those Broken Files where the file extension does not match the file header signature / magic number (not 100% accurate due to some file formats using container formats). This could work for images, .CHK files, etc. either applying a suggested file extension to all selected files or with a custom file extension (on GUI an extra editable column with suggested extension).
About File Signatures
Some programs that can detect file signatures
TrID
file
command (based on libmagic library) (GNU/Linux)exiftool
(for images, can also extract metadata useful to rename filename by date or other fields)DROID
Windows PowerShell (
Get-FileMetaData -Signature
)File Carving and File Recovery software
https://tika.apache.org/2.3.0/detection.html
Feature Request slightly related to #309