FTPCmd.java

  1. /*
  2.  * Licensed to the Apache Software Foundation (ASF) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * The ASF licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */

  17. package org.apache.commons.net.ftp;

  18. /**
  19.  * @since 3.3
  20.  */
  21. public enum FTPCmd {

  22.     /** FTP command. */
  23.     ABOR,

  24.     /** FTP command. */
  25.     ACCT,

  26.     /** FTP command. */
  27.     ALLO,

  28.     /** FTP command. */
  29.     APPE,

  30.     /** FTP command. */
  31.     CDUP,

  32.     /** FTP command. */
  33.     CWD,

  34.     /** FTP command. */
  35.     DELE,

  36.     /** FTP command. */
  37.     EPRT,

  38.     /** FTP command. */
  39.     EPSV,

  40.     /** FTP command. */
  41.     FEAT,

  42.     /** FTP command. */
  43.     HELP,

  44.     /** FTP command. */
  45.     LIST,

  46.     /** FTP command. */
  47.     MDTM,

  48.     /** FTP command. */
  49.     MFMT,

  50.     /** FTP command. */
  51.     MKD,

  52.     /** FTP command. */
  53.     MLSD,

  54.     /** FTP command. */
  55.     MLST,

  56.     /** FTP command. */
  57.     MODE,

  58.     /** FTP command. */
  59.     NLST,

  60.     /** FTP command. */
  61.     NOOP,

  62.     /** FTP command. */
  63.     PASS,

  64.     /** FTP command. */
  65.     PASV,

  66.     /** FTP command. */
  67.     PORT,

  68.     /** FTP command. */
  69.     PWD,

  70.     /** FTP command. */
  71.     QUIT,

  72.     /** FTP command. */
  73.     REIN,

  74.     /** FTP command. */
  75.     REST,

  76.     /** FTP command. */
  77.     RETR,

  78.     /** FTP command. */
  79.     RMD,

  80.     /** FTP command. */
  81.     RNFR,

  82.     /** FTP command. */
  83.     RNTO,

  84.     /** FTP command. */
  85.     SITE,

  86.     /** @since 3.7 */
  87.     SIZE,

  88.     /** FTP command. */
  89.     SMNT,

  90.     /** FTP command. */
  91.     STAT,

  92.     /** FTP command. */
  93.     STOR,

  94.     /** FTP command. */
  95.     STOU,

  96.     /** FTP command. */
  97.     STRU,

  98.     /** FTP command. */
  99.     SYST,

  100.     /** FTP command. */
  101.     TYPE,

  102.     /** FTP command. */
  103.     USER;

  104.     // Aliases

  105.     /** Alias. */
  106.     public static final FTPCmd ABORT = ABOR;

  107.     /** Alias. */
  108.     public static final FTPCmd ACCOUNT = ACCT;

  109.     /** Alias. */
  110.     public static final FTPCmd ALLOCATE = ALLO;

  111.     /** Alias. */
  112.     public static final FTPCmd APPEND = APPE;

  113.     /** Alias. */
  114.     public static final FTPCmd CHANGE_TO_PARENT_DIRECTORY = CDUP;

  115.     /** Alias. */
  116.     public static final FTPCmd CHANGE_WORKING_DIRECTORY = CWD;

  117.     /** Alias. */
  118.     public static final FTPCmd DATA_PORT = PORT;

  119.     /** Alias. */
  120.     public static final FTPCmd DELETE = DELE;

  121.     /** Alias. */
  122.     public static final FTPCmd FEATURES = FEAT;

  123.     /** Alias. */
  124.     public static final FTPCmd FILE_STRUCTURE = STRU;

  125.     /** Alias. */
  126.     public static final FTPCmd GET_MOD_TIME = MDTM;

  127.     /** Alias. */
  128.     public static final FTPCmd LOGOUT = QUIT;

  129.     /** Alias. */
  130.     public static final FTPCmd MAKE_DIRECTORY = MKD;

  131.     /** Alias. */
  132.     public static final FTPCmd MOD_TIME = MDTM;

  133.     /** Alias. */
  134.     public static final FTPCmd NAME_LIST = NLST;

  135.     /** Alias. */
  136.     public static final FTPCmd PASSIVE = PASV;

  137.     /** Alias. */
  138.     public static final FTPCmd PASSWORD = PASS;

  139.     /** Alias. */
  140.     public static final FTPCmd PRINT_WORKING_DIRECTORY = PWD;

  141.     /** Alias. */
  142.     public static final FTPCmd REINITIALIZE = REIN;

  143.     /** Alias. */
  144.     public static final FTPCmd REMOVE_DIRECTORY = RMD;

  145.     /** Alias. */
  146.     public static final FTPCmd RENAME_FROM = RNFR;

  147.     /** Alias. */
  148.     public static final FTPCmd RENAME_TO = RNTO;

  149.     /** Alias. */
  150.     public static final FTPCmd REPRESENTATION_TYPE = TYPE;

  151.     /** Alias. */
  152.     public static final FTPCmd RESTART = REST;

  153.     /** Alias. */
  154.     public static final FTPCmd RETRIEVE = RETR;

  155.     /** Alias. */
  156.     public static final FTPCmd SET_MOD_TIME = MFMT;

  157.     /** Alias. */
  158.     public static final FTPCmd SITE_PARAMETERS = SITE;

  159.     /** Alias. */
  160.     public static final FTPCmd STATUS = STAT;

  161.     /** Alias. */
  162.     public static final FTPCmd STORE = STOR;

  163.     /** Alias. */
  164.     public static final FTPCmd STORE_UNIQUE = STOU;

  165.     /** Alias. */
  166.     public static final FTPCmd STRUCTURE_MOUNT = SMNT;

  167.     /** Alias. */
  168.     public static final FTPCmd SYSTEM = SYST;

  169.     /** Alias. */
  170.     public static final FTPCmd TRANSFER_MODE = MODE;

  171.     /** Alias. */
  172.     public static final FTPCmd USERNAME = USER;

  173.     /**
  174.      * Retrieve the FTP protocol command string corresponding to a specified command code.
  175.      *
  176.      * @return The FTP protcol command string corresponding to a specified command code.
  177.      */
  178.     public final String getCommand() {
  179.         return name();
  180.     }

  181. }