{"action":"created","issue":{"url":"https://api.github.com/repos/morris/vinyl-ftp/issues/43","repository_url":"https://api.github.com/repos/morris/vinyl-ftp","labels_url":"https://api.github.com/repos/morris/vinyl-ftp/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/morris/vinyl-ftp/issues/43/comments","events_url":"https://api.github.com/repos/morris/vinyl-ftp/issues/43/events","html_url":"https://github.com/morris/vinyl-ftp/issues/43","id":135709663,"number":43,"title":"Check whether directory exists before calling mkdir","user":{"login":"jordanwallwork","id":1207929,"avatar_url":"https://avatars.githubusercontent.com/u/1207929?v=3","gravatar_id":"","url":"https://api.github.com/users/jordanwallwork","html_url":"https://github.com/jordanwallwork","followers_url":"https://api.github.com/users/jordanwallwork/followers","following_url":"https://api.github.com/users/jordanwallwork/following{/other_user}","gists_url":"https://api.github.com/users/jordanwallwork/gists{/gist_id}","starred_url":"https://api.github.com/users/jordanwallwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordanwallwork/subscriptions","organizations_url":"https://api.github.com/users/jordanwallwork/orgs","repos_url":"https://api.github.com/users/jordanwallwork/repos","events_url":"https://api.github.com/users/jordanwallwork/events{/privacy}","received_events_url":"https://api.github.com/users/jordanwallwork/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-23T11:22:56Z","updated_at":"2016-04-21T13:17:15Z","closed_at":null,"body":"Is it possible to check whether a directory exists before calling mkdir? I'm writing a gulp upload script which fails after the first run as it attempts to recreate an already existing directory. I can't delete the remote directory as the ftp user does not have permission to delete remote files, only to create new files/directories.\r\n\r\nCode's pretty standard but adding in case it's helpful\r\n\r\n\tgulp.task('upload-only', function() {\r\n\t\t\tvar conn = getFtpConnection();\r\n\t\t\treturn gulp.src(['code_drop/RetailGuardian.zip'], { base: '.', buffer: false } )\r\n\t\t\t\t\t.pipe( conn.dest('/RetailGuardian') );\r\n\t});\r\n"},"comment":{"url":"https://api.github.com/repos/morris/vinyl-ftp/issues/comments/212915245","html_url":"https://github.com/morris/vinyl-ftp/issues/43#issuecomment-212915245","issue_url":"https://api.github.com/repos/morris/vinyl-ftp/issues/43","id":212915245,"user":{"login":"ninjaonsafari","id":2211563,"avatar_url":"https://avatars.githubusercontent.com/u/2211563?v=3","gravatar_id":"","url":"https://api.github.com/users/ninjaonsafari","html_url":"https://github.com/ninjaonsafari","followers_url":"https://api.github.com/users/ninjaonsafari/followers","following_url":"https://api.github.com/users/ninjaonsafari/following{/other_user}","gists_url":"https://api.github.com/users/ninjaonsafari/gists{/gist_id}","starred_url":"https://api.github.com/users/ninjaonsafari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninjaonsafari/subscriptions","organizations_url":"https://api.github.com/users/ninjaonsafari/orgs","repos_url":"https://api.github.com/users/ninjaonsafari/repos","events_url":"https://api.github.com/users/ninjaonsafari/events{/privacy}","received_events_url":"https://api.github.com/users/ninjaonsafari/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T13:17:15Z","updated_at":"2016-04-21T13:17:15Z","body":"I am facing the same issue. I already created a [stackoverflow question](\r\nhttp://stackoverflow.com/questions/36766698/vinyl-ftp-cannot-create-a-file-when-that-file-already-exists).\r\n\r\nServer: Windows 12 R2 Standard 64bit"}}