lordgamez commented on a change in pull request #942:
URL: https://github.com/apache/nifi-minifi-cpp/pull/942#discussion_r533564990
##########
File path: libminifi/include/utils/file/FileUtils.h
##########
@@ -303,55 +322,74 @@ inline bool get_uid_gid(const std::string &path, uint64_t
&uid, uint64_t &gid) {
#endif
inline int is_directory(const char * path) {
- struct stat dir_stat;
- if (stat(path, &dir_stat) < 0) {
- return 0;
- }
- return S_ISDIR(dir_stat.st_mode);
+ struct stat dir_stat;
+ if (stat(path, &dir_stat) < 0) {
+ return 0;
+ }
+ return S_ISDIR(dir_stat.st_mode);
+}
+
+inline int exists(const std::string& path) {
Review comment:
Fixed in
[163bbea](https://github.com/apache/nifi-minifi-cpp/pull/942/commits/163bbeaa1f80756ff7d9b3f034e4e0bc71c3dcee)
##########
File path: extensions/standard-processors/processors/PutFile.cpp
##########
@@ -54,6 +54,19 @@ core::Property PutFile::CreateDirs("Create Missing
Directories", "If true, then
core::Property PutFile::MaxDestFiles(
core::PropertyBuilder::createProperty("Maximum File
Count")->withDescription("Specifies the maximum number of files that can exist
in the output directory")->withDefaultValue<int>(-1)->build());
+#ifndef WIN32
+core::Property PutFile::Permissions(
+ core::PropertyBuilder::createProperty("Permissions")
+ ->withDescription("Sets the permissions on the output file to the value
of this attribute. "
+ "Format must be format octal number (e.g. 644 or
0755). Not supported on Windows systems.")
Review comment:
Fixed in
[163bbea](https://github.com/apache/nifi-minifi-cpp/pull/942/commits/163bbeaa1f80756ff7d9b3f034e4e0bc71c3dcee)
##########
File path: PROCESSORS.md
##########
@@ -899,6 +899,8 @@ In the list below, the names of required properties appear
in bold. Any other pr
|**Create Missing Directories**|true||If true, then missing destination
directories will be created. If false, flowfiles are penalized and sent to
failure.|
|Directory|.||The output directory to which to put files<br/>**Supports
Expression Language: true**|
|Maximum File Count|-1||Specifies the maximum number of files that can exist
in the output directory|
+|Permissions|||Sets the permissions on the output file to the value of this
attribute. Format must be in octal number (e.g. 644 or 0755). Not supported on
Windows systems.|
+|Directory Permissions|||Sets the permissions on the directories being created
if 'Create Missing Directories' property is set. Format must be format octal
number (e.g. 644 or 0755). Not supported on Windows systems.|
Review comment:
Fixed in
[163bbea](https://github.com/apache/nifi-minifi-cpp/pull/942/commits/163bbeaa1f80756ff7d9b3f034e4e0bc71c3dcee)
----------------------------------------------------------------
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]