#include "common/step/mount/step_mount_unpacked.h"
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path.hpp>
#include <unistd.h>
+#include <filesystem>
#include <string>
#include "common/utils/paths.h"
#include "common/tzip_interface.h"
#include "common/zip_interface.h"
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
+namespace fs = std::filesystem;
namespace {
namespace mount {
Step::Status StepMountUnpacked::process() {
- bf::path tmp_dir = GenerateTmpDir(kPackageUnpackDirPath);
+ fs::path tmp_dir = GenerateTmpDir(kPackageUnpackDirPath);
context_->unpacked_dir_path.set(tmp_dir);
// write unpacked directory for recovery file
// to remove unpacked dir properly when recovery mode
RemoveAll(context_->unpacked_dir_path.get());
if (context_->request_type.get() == RequestType::MountUpdate) {
- bf::path mount_point = GetMountLocation(context_->GetPkgPath());
+ fs::path mount_point = GetMountLocation(context_->GetPkgPath());
auto zip_final = CreateZipInterface(mount_point);
if (!zip_final->UnmountZip()) {
LOG(ERROR) << "Failed to unmount zip package after revoke";
LOG(ERROR) << "file_path attribute is empty";
return Step::Status::INVALID_VALUE;
}
- if (!bf::exists(context_->file_path.get())) {
+ if (!fs::exists(context_->file_path.get())) {
LOG(ERROR) << "file_path ("
<< context_->file_path.get()
<< ") path does not exist";
LOG(ERROR) << "root_application_path attribute is empty";
return Step::Status::INVALID_VALUE;
}
- if (!bf::exists(context_->root_application_path.get())) {
+ if (!fs::exists(context_->root_application_path.get())) {
LOG(ERROR) << "root_application_path ("
<< context_->root_application_path.get()
<< ") path does not exist";
}
std::unique_ptr<IZipInterface> StepMountUnpacked::CreateZipInterface(
- const boost::filesystem::path& mount_path) {
+ const fs::path& mount_path) {
std::unique_ptr<IZipInterface> zip_interface(
new TzipInterface(mount_path));
return zip_interface;