URL url = new URL(path);
if (path.startsWith("ftp:")) {
String host = url.getHost();
FTPClient ftp = FTPUtils.connect(host, url.getUserInfo(), new UserPasswordInputImpl());
ftp.pasv();
FTPReply reply = ftp.executeCommand("MDTM " + url.getPath());
resp = reply.getReplyString();
return ftpDateFormat.parse(resp).getTime();
} else {
return HttpUtils.getInstance().getLastModified(url);
}