Age | Commit message (Collapse) | Author |
|
|
|
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).
No functional changes.
|
|
This is a pretty trivial change so they're all batched together.
|
|
|
|
|
|
This is required for the Kernel's usage of LibELF, since Strings do not
expose allocation failure.
|
|
|
|
|
|
MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
|
|
It now shows some useful at-a-glance information about ELF files, like
it does on other *nix systems.
|
|
Previously, ImageDecoder::create() would return a NonnullRefPtr and
could not "fail", although the returned decoder may be "invalid" which
you then had to check anyway.
The new interface looks like this:
static RefPtr<Gfx::ImageDecoder> try_create(ReadonlyBytes);
This simplifies ImageDecoder since it no longer has to worry about its
validity. Client code gets slightly clearer as well.
|
|
Previously, empty files with no identifiable file type extension would
show up as `text/plain`. This fixes it up to show empty files as what
they really are - full of nothing.
|
|
Before file would output 'text/html' when the path was a directory.
|
|
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! :^)
|
|
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.
|
|
This adds gzip, sqlite, 7-Zip, flac and midi.
|
|
...and make it an enum class so people don't omit "OpenMode".
|
|
|
|
- Improve naming
- Order alphabetically
- Remove duplicates
|
|
|
|
Instead just remember that a file failed to open, carry on and return 1
at the end.
|
|
|
|
|
|
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.
|