#include <cassert>
#include <cstring>
+#include <filesystem>
#include <string>
+#include <system_error>
#include "common/utils/paths.h"
#include "common/utils/file_util.h"
namespace common_installer {
namespace filesystem {
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
+namespace fs = std::filesystem;
Step::Status StepCopyTep::precheck() {
if (context_->root_application_path.get().empty()) {
return Step::Status::INVALID_VALUE;
}
- if (!boost::filesystem::exists(context_->root_application_path.get())) {
+ if (!std::filesystem::exists(context_->root_application_path.get())) {
LOG(ERROR) << "root_application_path ("
<< context_->root_application_path.get()
<< ") path does not exist";
Step::Status StepCopyTep::process() {
if (context_->tep_path.get().empty())
return Step::Status::OK;
- bf::path tep_path;
+ fs::path tep_path;
if (context_->external_storage) {
tep_path = GetExternalTepPath(context_->request_mode.get(),
context_->uid.get());
// appstore uses to identify version of tep on device.
tep_path /= context_->tep_path.get().filename();
- if (!bf::exists(tep_path.parent_path())) {
- bs::error_code error;
- bf::create_directories(tep_path.parent_path(), error);
+ if (!fs::exists(tep_path.parent_path())) {
+ std::error_code error;
+ fs::create_directories(tep_path.parent_path(), error);
if (error) {
LOG(ERROR) << "Cannot create tep parent directory";
return Status::APP_DIR_ERROR;
RemoveAll(context_->tep_path.get());
// remove tep file is installed outside package path
if (context_->external_storage) {
- bf::path tep_path = GetExternalTepPath(context_->request_mode.get(),
+ fs::path tep_path = GetExternalTepPath(context_->request_mode.get(),
context_->uid.get());
tep_path /= context_->tep_path.get().filename();
RemoveAll(tep_path);