// reset state variables
session.resetState();
// change directory
FileSystemView fsview = session.getFileSystemView();
boolean success = false;
try {
success = fsview.changeDirectory("..");
}
catch(Exception ex) {
LOG.debug("Failed to change directory in file system", ex);
}
if(success) {
String dirName = fsview.getCurrentDirectory().getFullName();
session.write(FtpReplyUtil.translate(session, request, context, FtpReply.REPLY_250_REQUESTED_FILE_ACTION_OKAY, "CDUP", dirName));
}
else {
session.write(FtpReplyUtil.translate(session, request, context, FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN, "CDUP", null));
}