szaszm commented on a change in pull request #875:
URL: https://github.com/apache/nifi-minifi-cpp/pull/875#discussion_r478526342
##########
File path: libminifi/include/utils/file/PathUtils.h
##########
@@ -47,7 +53,52 @@ std::string getFullPath(const std::string& path);
std::string globToRegex(std::string glob);
-} // namespace PathUtils
+inline bool isAbsolutePath(const char* const path) noexcept {
+#ifdef _WIN32
+ return path && std::isalpha(path[0]) && path[1] == ':' && (path[2] == '\\'
|| path[2] == '/');
+#else
+ return path && path[0] == '/';
+#endif
+}
+
+
+/**
+ * Represents filesystem space information in bytes
+ */
+struct space_info {
+ std::uintmax_t capacity;
+ std::uintmax_t free;
+ std::uintmax_t available;
+
+ friend bool operator==(const space_info& a, const space_info& b) noexcept {
+ return a.capacity == b.capacity && a.free == b.free && a.available ==
b.available;
+ }
+};
+
+class filesystem_error : public std::system_error {
+ std::shared_ptr<const std::pair<std::string, std::string>> paths_involved_;
Review comment:
fixed in 13116f0
----------------------------------------------------------------
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]