Skip to content

Commit f3747c6

Browse files
authored
Add ftps.mkdir() to available chainable functions (#83)
1 parent b8b7990 commit f3747c6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ ftps.put(pathToLocalFile, [pathToRemoteFile]) // alias: addFile
8282
ftps.get(pathToRemoteFile, [pathToLocalFile]) // download remote file and save to local path (if not given, use same name as remote file), alias: getFile
8383
ftps.mv(from, to) // alias move
8484
ftps.rm(file1, file2, ...) // alias remove
85+
ftps.mkdir(pathToNewDir, mode)
8586
ftps.rmdir(directory1, directory2, ...)
8687
ftps.mirror({
8788
remoteDir: '.', // optional, default: .

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,4 +284,8 @@ FTP.prototype.mirror = function (opts) {
284284
return this.raw(raw)
285285
}
286286

287+
FTP.prototype.mkdir = function (directory, mode) {
288+
return this.raw('mkdir ' + mode + ' ' + directory)
289+
};
290+
287291
module.exports = FTP

0 commit comments

Comments
 (0)