| inline bool createDirectory(std::string_view path) |
| // Create persistent directory |
| BMCWEB_LOG_DEBUG("Creating persistent directory : {}", path); |
| bool dirCreated = std::filesystem::create_directories(path, ec); |
| BMCWEB_LOG_ERROR("Failed to create persistent directory : {}", path); |
| // set the permission of the directory to 700 |
| BMCWEB_LOG_DEBUG("Setting the permission to 700"); |
| std::filesystem::perms permission = std::filesystem::perms::owner_all; |
| std::filesystem::permissions(path, permission); |
| BMCWEB_LOG_DEBUG("{} already exists", path); |