#include "common/step/filesystem/step_copy_storage_directories.h"
-#include <boost/filesystem/path.hpp>
-#include <boost/system/error_code.hpp>
-
+#include <filesystem>
#include <string>
+#include <system_error>
#include "common/utils/paths.h"
#include "utils/file_util.h"
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
+namespace fs = std::filesystem;
namespace {
namespace filesystem {
bool StepCopyStorageDirectories::CopyAppStorage(
- const bf::path& in_src,
- const bf::path& in_dst,
+ const fs::path& in_src,
+ const fs::path& in_dst,
const char *key,
bool merge_dirs) {
- bf::path src = in_src / key;
- bf::path dst = in_dst / key;
+ fs::path src = in_src / key;
+ fs::path dst = in_dst / key;
return common_installer::CopyDir(src, dst,
merge_dirs ? common_installer::FS_MERGE_SKIP |
common_installer::FS_PRESERVE_OWNERSHIP_AND_PERMISSIONS
backup_path_ =
common_installer::GetBackupPathForPackagePath(context_->GetPkgPath());
- bs::error_code error_code;
- if (!bf::exists(backup_path_, error_code)) {
+ std::error_code error_code;
+ if (!fs::exists(backup_path_, error_code)) {
LOG(DEBUG) << "Cannot restore storage directories from: " << backup_path_;
return Status::INVALID_VALUE;
}
}
bool StepCopyStorageDirectories::CacheDir() {
- bs::error_code error_code;
- bf::path cache_path = context_->GetPkgPath() / kCache;
- bf::create_directory(cache_path, error_code);
+ std::error_code error_code;
+ fs::path cache_path = context_->GetPkgPath() / kCache;
+ fs::create_directory(cache_path, error_code);
if (error_code) {
LOG(ERROR) << "Failed to create cache directory for package";
return false;