summaryrefslogtreecommitdiff
path: root/Userland/Utilities/file.cpp
AgeCommit message (Collapse)Author
2021-05-27file: Output directory when path is a directoryArjan Zuidema
Before file would output 'text/html' when the path was a directory.
2021-05-24LibCore+Userland: Add 13 more detectable file typesValtteri Koskivuori
This patch adds 13 new detectable file formats, which are as follows in alphabetical order: .blend, .isz, ext* filesystem, Lua bytecode, Matroska container, NES ROM, .pdf, qcow image, .rtf, WebAssembly bytecode, Windows 3.1X/95 compressed archive and raw zlib stream Some are a tad esoteric, but the more file types we detect, the more useful this utility becomes! :^)
2021-05-18LibCore+Userland: Add two more detectable formatsValtteri Koskivuori
Second batch of detectable formats, this time with verious offsets, as enabled by the previous commit. This adds tar, and the three signature variants for iso-9660 image files.
2021-05-18LibCore+Userland: Add 5 more detectable filetypesValtteri Koskivuori
This adds gzip, sqlite, 7-Zip, flac and midi.
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-05-07Utilities: Use GzipDecompressor::describe_header for gzip descriptionsIdan Horowitz
2021-05-07file: Clean up mime type enumeration macroLinus Groh
- Improve naming - Order alphabetically - Remove duplicates
2021-05-07file: Remove unused static description stringsLinus Groh
2021-05-07file: Don't exit immediately after file open errorLinus Groh
Instead just remember that a file failed to open, carry on and return 1 at the end.
2021-05-07file: Remove redundant value_or({})Linus Groh
2021-05-07file: Avoid some unnecessary string copiesLinus Groh
2021-05-07Userland: Implement a file utilityValtteri Koskivuori
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.