19 #include <string_view>
21 #include "lfilesystem/lfilesystem_Export.h"
72 [[nodiscard]]
FSPerms getStdPerms() const noexcept;
90 bool operator== (
FSPerms p) const noexcept;
99 enum class LFILE_EXPORT Scope
118 bool hasRead (Scope s = Scope::All) const noexcept;
123 bool hasWrite (Scope s = Scope::All) const noexcept;
128 bool hasExecute (Scope s = Scope::All) const noexcept;
135 bool hasAll (Scope s = Scope::All) const noexcept;
147 bool hasStickyBit() const noexcept;
159 [[nodiscard]]
Permissions withRead (Scope s = Scope::All) const noexcept;
166 [[nodiscard]]
Permissions withWrite (Scope s = Scope::All) const noexcept;
173 [[nodiscard]]
Permissions withExecute (Scope s = Scope::All) const noexcept;
182 [[nodiscard]]
Permissions withAll (Scope s = Scope::All) const noexcept;
214 [[nodiscard]] std::
string toString() const;
229 [[nodiscard]] static
Permissions fromString (const std::string_view&
string) noexcept;
251 FSPerms perms { FSPerms::none };
259 std::ostream& operator<< (std::ostream& os,
const Permissions& value);
This class encapsulates the standard library's permissions bitmask type, and provides some higher-lev...
Permissions(FSPerms p) noexcept
Creates a Permissions object holding the specified permissions value.
Permissions()=default
Creates a Permissions object holding the value FSPerms::none .
bool isUnknownOrEmpty() const noexcept
Returns true if this permissions object holds the values FSPerms::none or FSPerms::unknown .
std::filesystem::perms FSPerms
A typedef for the standard library permissions type.
Owner
This scope includes only the owner of the file.
Others
This scope includes all users outside the file's user group.
Group
This scope includes the file's user group.