handleOptions method

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

Implementation

void handleOptions(String argument, FtpSession session) {
  var args = argument.split(" ");
  var option = args[0].toUpperCase();
  switch (option) {
    case "UTF8":
      var mode = args[1].toUpperCase() == "ON";
      session.sendResponse("200 UTF8 mode ${mode ? 'enable' : 'disable'}");
      break;
    default:
      session.sendResponse('502 Command not implemented handleOptions');
      break;
  }
}