aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgConstants.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-02-05 09:35:55 +0000
committerSaturneric <[email protected]>2022-02-05 09:35:55 +0000
commit260bb5426b6621d409f4e68981e49c936cb313bb (patch)
tree48a9b97c891d2bd8a02a43ce25dc5b725fe9a115 /src/core/GpgConstants.cpp
parent<refactor>(ui, core, project): Move Key Package logic into core (diff)
downloadGpgFrontend-260bb5426b6621d409f4e68981e49c936cb313bb.tar.gz
GpgFrontend-260bb5426b6621d409f4e68981e49c936cb313bb.zip
<refactor>(ui, core, project): Use std::filesystem instead of boost::filesystem
Diffstat (limited to '')
-rw-r--r--src/core/GpgConstants.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/GpgConstants.cpp b/src/core/GpgConstants.cpp
index 8617e2b9..f35c257d 100644
--- a/src/core/GpgConstants.cpp
+++ b/src/core/GpgConstants.cpp
@@ -31,7 +31,6 @@
#include <gpg-error.h>
#include <boost/algorithm/string/predicate.hpp>
-#include <boost/filesystem.hpp>
#include <string>
const char* GpgFrontend::GpgConstants::PGP_CRYPT_BEGIN =
@@ -116,7 +115,7 @@ static inline std::string trim(std::string& s) {
}
std::string GpgFrontend::read_all_data_in_file(const std::string& utf8_path) {
- using namespace boost::filesystem;
+ using namespace std::filesystem;
class path file_info(utf8_path.c_str());
if (!exists(file_info) || !is_regular_file(file_info)) return {};
std::ifstream in_file;
@@ -135,7 +134,7 @@ std::string GpgFrontend::read_all_data_in_file(const std::string& utf8_path) {
bool GpgFrontend::write_buffer_to_file(const std::string& utf8_path,
const std::string& out_buffer) {
- using namespace boost::filesystem;
+ using namespace std::filesystem;
class path file_info(utf8_path.c_str());
#ifndef WINDOWS
std::ofstream out_file(file_info.string(), std::ios::out | std::ios::trunc);
@@ -151,7 +150,7 @@ bool GpgFrontend::write_buffer_to_file(const std::string& utf8_path,
std::string GpgFrontend::get_file_extension(const std::string& path) {
// Create a path object from given string
- boost::filesystem::path path_obj(path);
+ std::filesystem::path path_obj(path);
// Check if file name in the path object has extension
if (path_obj.has_extension()) {
@@ -164,7 +163,7 @@ std::string GpgFrontend::get_file_extension(const std::string& path) {
std::string GpgFrontend::get_only_file_name_with_path(const std::string& path) {
// Create a path object from given string
- boost::filesystem::path path_obj(path);
+ std::filesystem::path path_obj(path);
// Check if file name in the path object has extension
if (path_obj.has_filename()) {
// Fetch the extension from path object and return