Commit graph

4 commits

Author SHA1 Message Date
Andreas Kling
c1af2f28e3 LibCore: Add Directory::chown() API and use it in Core::Account
Since we already have the directory open, let's have an API to fchown()
the underlying file descriptor instead of forcing clients to do another
path lookup.
2022-08-15 17:18:11 +02:00
Sam Atkins
72893b4f9e LibCore: Add an optional permissions mask to Directory::create()
Being able to pass a mask is the one feature `mkdir()` had that this
didn't. Adding it here means everyone can use the nicer Directory API.
2022-04-13 16:00:17 +02:00
Sam Atkins
6967d37678 LibCore: Prevent infinite recursion in Directory::ensure_directory()
If a relative path was passed in, then repeatedly asking for its parent
will never reach `/`. The top-level path in that case is `.`.
2022-04-13 16:00:17 +02:00
kleines Filmröllchen
46b76f2f55 LibCore: Introduce Directory
Core::Directory represents an existing directory on the system, and it
holds an actual file descriptor so that the user can be sure the
directory stays in existence.
2022-04-11 00:08:48 +02:00