ssh2 icon indicating copy to clipboard operation
ssh2 copied to clipboard

creating non existing directory in the path while uploading the file

Open kishor-nrpt opened this issue 5 years ago • 2 comments

Hi, I am trying to upload a file into sftp server using ssh2 client. Location of the file on the server could be in a non existing directory. Current code example I have is not creating a directory which is not there on the server but on upload path. Is it possible to create directories if not exist in server while uploading the file itself ? If yes should I use any flags? any code examples would be really appreciated.

kishor-nrpt avatar Aug 10 '19 16:08 kishor-nrpt

No such functionality exists, you'd have to walk the path yourself to make sure the destination directory exists first, creating each sub directory where needed.

mscdex avatar Aug 10 '19 16:08 mscdex

@mscdex thx for your reply. Could it be added to feature request?

kishor-nrpt avatar Aug 10 '19 17:08 kishor-nrpt