95 {
96#if defined(MAYAFLUX_PLATFORM_WINDOWS)
97 (void)directory;
98 return true;
99#else
100 std::error_code ec;
101 const auto status = std::filesystem::status(directory, ec);
102 if (ec) {
103 return false;
104 }
105 const auto permissions = status.permissions();
106 const bool others_write = (permissions & std::filesystem::perms::others_write) != std::filesystem::perms::none;
107 const bool sticky = (permissions & std::filesystem::perms::sticky_bit) != std::filesystem::perms::none;
108 return !others_write || sticky;
109#endif
110 }