MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / InterpretPermString

Function InterpretPermString

src/util/fs_helpers.cpp:310–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310std::optional<fs::perms> InterpretPermString(const std::string& s)
311{
312 if (s == "owner") {
313 return fs::perms::owner_read | fs::perms::owner_write;
314 } else if (s == "group") {
315 return fs::perms::owner_read | fs::perms::owner_write |
316 fs::perms::group_read;
317 } else if (s == "all") {
318 return fs::perms::owner_read | fs::perms::owner_write |
319 fs::perms::group_read |
320 fs::perms::others_read;
321 } else {
322 return std::nullopt;
323 }
324}
325
326bool IsDirWritable(const fs::path& dir_path)
327{

Callers 1

InitRPCAuthenticationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected