handleMode method

void handleMode(
  1. String argument,
  2. FtpSession session
)

Implementation

void handleMode(String argument, FtpSession session) {
  if (argument.isEmpty) {
    session.sendResponse('501 Syntax error in parameters');
    return;
  }
  if (argument.toUpperCase() == 'S') {
    session.sendResponse('200 Mode set to Stream');
  } else {
    session.sendResponse('504 Mode not supported');
  }
}