You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Si Sun (Jira)" <ji...@apache.org> on 2020/10/01 12:30:00 UTC
[jira] [Commented] (NIFI-7863) PutSmbFile does not create missing
folder parents folder
[ https://issues.apache.org/jira/browse/NIFI-7863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17205463#comment-17205463 ]
Si Sun commented on NIFI-7863:
------------------------------
hmm, yes this case wasn't considered ...
according to [smbj docs|https://javadoc.io/static/com.hierynomus/smbj/0.10.0/com/hierynomus/smbj/share/DiskShare.html] and [this response|https://github.com/hierynomus/smbj/issues/296] there is no direct method to create the folders in a recursive manner. So I suppose we need to split the folder path and recursively check with folderExists and then call mkdir.
> PutSmbFile does not create missing folder parents folder
> --------------------------------------------------------
>
> Key: NIFI-7863
> URL: https://issues.apache.org/jira/browse/NIFI-7863
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.12.1
> Reporter: Jens M Kofoed
> Priority: Major
>
> I'm trying the new PutSmbFile, which I have been waiting for for years. So many many thanks to the code writer.
> In the properties it is possible to set "Create Missing Directories" to true. But it will only create the last subdir and not multiple dirs.
> So for instance I would like to save files in: \\server\share\dir1\dir2\dir3. Both Dir1 and Dir2 have to exists.
> It is not possible to save files in dynamically subpaths like: ${year}\${month}\${day}
> This i possible with PutFTP.
> Looking through the code, it use share.mkdir(directory) instead of .mkdir*s*
--
This message was sent by Atlassian Jira
(v8.3.4#803005)