Commit graph

7 commits

Author SHA1 Message Date
Ben Wiederhake f890b70eae Tests: Prefer TRY_OR_FAIL() and MUST() over EXPECT(!.is_error())
Note that in some cases (in particular SQL::Result and PDFErrorOr),
there is no Formatter defined for the error type, hence TRY_OR_FAIL
cannot work as-is. Furthermore, this commit leaves untouched the places
where MUST could be replaced by TRY_OR_FAIL.

Inspired by:
https://github.com/SerenityOS/serenity/pull/18710#discussion_r1186892445
2023-05-14 15:39:38 -06:00
Tim Schumacher 6c4b5775e1 LibCore: Implement four-digit modes for FilePermissionsMask parsing 2022-07-27 21:45:01 +00:00
Tim Schumacher 130f04c493 LibCore: Implement the 'X' modifier into FilePermissionMask 2022-07-27 21:45:01 +00:00
sin-ack 3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
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.
2022-07-12 23:11:35 +02:00
Xavier Defrang 070d70848f LibCore: Improve handling of parsing errors in FilePermissionsMask 2022-01-24 07:50:32 +00:00
Xavier Defrang 30f58de800 LibCore: Restore support for multiple symbolic classes
Reverts recent change introduced to support implicit symbolic permission
which broke the parser when multiple classes are specified.
The state machine must assume it's dealing with classes until an
operation character is consumed.
2022-01-24 07:50:32 +00:00
Xavier Defrang 8b95423b50 LibCore: Add FilePermissionsMask
This class parses UNIX file permissions definitions in numeric (octal)
or symbolic (ugoa+rwx) format and can apply them on a given file mode.
2022-01-01 17:33:43 +00:00