Valtteri Koskivuori
105bbc457d
LibCore+Userland: Add 5 more detectable filetypes
...
This adds gzip, sqlite, 7-Zip, flac and midi.
2021-05-18 19:57:53 +01:00
Ali Mohammad Pur
a91a49337c
LibCore+Everywhere: Move OpenMode out of IODevice
...
...and make it an enum class so people don't omit "OpenMode".
2021-05-12 11:00:45 +01:00
Idan Horowitz
284730c002
Utilities: Use GzipDecompressor::describe_header for gzip descriptions
2021-05-07 23:22:07 +02:00
Linus Groh
e37d9eabb1
file: Clean up mime type enumeration macro
...
- Improve naming
- Order alphabetically
- Remove duplicates
2021-05-07 15:43:23 +01:00
Linus Groh
2ddd2d0866
file: Remove unused static description strings
2021-05-07 15:43:23 +01:00
Linus Groh
d7446e05db
file: Don't exit immediately after file open error
...
Instead just remember that a file failed to open, carry on and return 1
at the end.
2021-05-07 15:43:23 +01:00
Linus Groh
85a7dae391
file: Remove redundant value_or({})
2021-05-07 15:43:23 +01:00
Linus Groh
a9fcdc767e
file: Avoid some unnecessary string copies
2021-05-07 15:43:23 +01:00
Valtteri Koskivuori
8b2706e5bb
Userland: Implement a file utility
...
This unix classic attempts to classify and identify information about
given files based on various heuristics. In this case, we're relying on
the Core::MimeData detector for file type and LibGfx::ImageDecoder for
additional metadata if the given file is an image.
It's very simple for now, but adding new detectors should be quite easy.
2021-05-07 11:46:53 +01:00