INT-1756 added support for auto-creating remote directories

This commit is contained in:
Oleg Zhurakousky
2011-03-09 09:54:27 -05:00
parent d16ba3061d
commit d12eadf33c
9 changed files with 65 additions and 3 deletions

View File

@@ -113,4 +113,15 @@ class FtpSession implements Session {
}
logger.info("File have been successfully renamed from: " + pathFrom + " to " + pathTo);
}
public void mkdir(String directory) throws IOException {
try {
this.client.makeDirectory(directory);
}
catch (Exception e) {
if (logger.isWarnEnabled()) {
logger.warn("failed to create directory '" + directory + "'", e);
}
}
}
}