ssh2
ssh2 copied to clipboard
creating non existing directory in the path while uploading the file
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.
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 thx for your reply. Could it be added to feature request?