stdpain commented on a change in pull request #5579:
URL: https://github.com/apache/incubator-doris/pull/5579#discussion_r603251184
##########
File path: be/src/util/filesystem_util.cc
##########
@@ -21,28 +21,25 @@
#include <sys/resource.h>
#include <sys/stat.h>
-#include <boost/filesystem.hpp>
+#include <filesystem>
#include "util/error_util.h"
-namespace errc = boost::system::errc;
-namespace filesystem = boost::filesystem;
-
-using boost::system::error_code;
+using std::error_code;
using std::exception;
using std::string;
using std::vector;
-// boost::filesystem functions must be given an errcode parameter to avoid the
variants
+// std::filesystem functions must be given an errcode parameter to avoid the
variants
// of those functions that throw exceptions.
namespace doris {
Status FileSystemUtil::create_directory(const string& directory) {
error_code errcode;
- bool exists = filesystem::exists(directory, errcode);
+ bool exists = std::filesystem::exists(directory, errcode);
// Need to check for no_such_file_or_directory error case - Boost's
exists() sometimes
// returns an error when it should simply return false.
- if (errcode != errc::success && errcode !=
errc::no_such_file_or_directory) {
+ if (errcode&& errcode != std::errc::no_such_file_or_directory) {
Review comment:
need a code format here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]