phrocker commented on a change in pull request #558: MINIFICPP-542 - Add
PutSFTP processor
URL: https://github.com/apache/nifi-minifi-cpp/pull/558#discussion_r285084492
##########
File path: libminifi/include/utils/file/FileUtils.h
##########
@@ -196,6 +200,29 @@ class FileUtils {
return 0;
}
+#ifndef WIN32
+ static bool get_permissions(const std::string &path, uint32_t &permissions) {
+ struct stat result;
+ if (stat(path.c_str(), &result) == 0) {
+ permissions = result.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
+ return true;
+ }
+ return false;
+ }
+#endif
+
+#ifndef WIN32
+ static bool get_uid_gid(const std::string &path, uint64_t &uid, uint64_t
&gid) {
+ struct stat result;
+ if (stat(path.c_str(), &result) == 0) {
Review comment:
I'm guessing the Windows GUID doesn't work 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]
With regards,
Apache Git Services