code: public void changeDir(String dir)
          throws IOException, ServerException {
          if (dir == null) {
              throw new IllegalArgumentException("Required argument missing");
          }
          Command cmd = new Command("CWD", dir);
          try {
              controlChannel.execute(cmd);
          } catch (FTPReplyParseException rpe) {
              throw ServerException.embedFTPReplyParseException(rpe);
          } catch (UnexpectedReplyCodeException urce) {
              throw ServerException.embedUnexpectedReplyCodeException(
                                  urce,
                                  "Server refused changing directory");
          }
      }
docs: Changes the remote current working directory.