001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018package org.apache.commons.net.ftp; 019 020/** 021 * @since 3.3 022 */ 023public enum FTPCmd { 024 025 /** FTP command. */ 026 ABOR, 027 028 /** FTP command. */ 029 ACCT, 030 031 /** FTP command. */ 032 ALLO, 033 034 /** FTP command. */ 035 APPE, 036 037 /** FTP command. */ 038 CDUP, 039 040 /** FTP command. */ 041 CWD, 042 043 /** FTP command. */ 044 DELE, 045 046 /** FTP command. */ 047 EPRT, 048 049 /** FTP command. */ 050 EPSV, 051 052 /** FTP command. */ 053 FEAT, 054 055 /** FTP command. */ 056 HELP, 057 058 /** FTP command. */ 059 LIST, 060 061 /** FTP command. */ 062 MDTM, 063 064 /** FTP command. */ 065 MFMT, 066 067 /** FTP command. */ 068 MKD, 069 070 /** FTP command. */ 071 MLSD, 072 073 /** FTP command. */ 074 MLST, 075 076 /** FTP command. */ 077 MODE, 078 079 /** FTP command. */ 080 NLST, 081 082 /** FTP command. */ 083 NOOP, 084 085 /** FTP command. */ 086 PASS, 087 088 /** FTP command. */ 089 PASV, 090 091 /** FTP command. */ 092 PORT, 093 094 /** FTP command. */ 095 PWD, 096 097 /** FTP command. */ 098 QUIT, 099 100 /** FTP command. */ 101 REIN, 102 103 /** FTP command. */ 104 REST, 105 106 /** FTP command. */ 107 RETR, 108 109 /** FTP command. */ 110 RMD, 111 112 /** FTP command. */ 113 RNFR, 114 115 /** FTP command. */ 116 RNTO, 117 118 /** FTP command. */ 119 SITE, 120 121 /** @since 3.7 */ 122 SIZE, 123 124 /** FTP command. */ 125 SMNT, 126 127 /** FTP command. */ 128 STAT, 129 130 /** FTP command. */ 131 STOR, 132 133 /** FTP command. */ 134 STOU, 135 136 /** FTP command. */ 137 STRU, 138 139 /** FTP command. */ 140 SYST, 141 142 /** FTP command. */ 143 TYPE, 144 145 /** FTP command. */ 146 USER; 147 148 // Aliases 149 150 /** Alias. */ 151 public static final FTPCmd ABORT = ABOR; 152 153 /** Alias. */ 154 public static final FTPCmd ACCOUNT = ACCT; 155 156 /** Alias. */ 157 public static final FTPCmd ALLOCATE = ALLO; 158 159 /** Alias. */ 160 public static final FTPCmd APPEND = APPE; 161 162 /** Alias. */ 163 public static final FTPCmd CHANGE_TO_PARENT_DIRECTORY = CDUP; 164 165 /** Alias. */ 166 public static final FTPCmd CHANGE_WORKING_DIRECTORY = CWD; 167 168 /** Alias. */ 169 public static final FTPCmd DATA_PORT = PORT; 170 171 /** Alias. */ 172 public static final FTPCmd DELETE = DELE; 173 174 /** Alias. */ 175 public static final FTPCmd FEATURES = FEAT; 176 177 /** Alias. */ 178 public static final FTPCmd FILE_STRUCTURE = STRU; 179 180 /** Alias. */ 181 public static final FTPCmd GET_MOD_TIME = MDTM; 182 183 /** Alias. */ 184 public static final FTPCmd LOGOUT = QUIT; 185 186 /** Alias. */ 187 public static final FTPCmd MAKE_DIRECTORY = MKD; 188 189 /** Alias. */ 190 public static final FTPCmd MOD_TIME = MDTM; 191 192 /** Alias. */ 193 public static final FTPCmd NAME_LIST = NLST; 194 195 /** Alias. */ 196 public static final FTPCmd PASSIVE = PASV; 197 198 /** Alias. */ 199 public static final FTPCmd PASSWORD = PASS; 200 201 /** Alias. */ 202 public static final FTPCmd PRINT_WORKING_DIRECTORY = PWD; 203 204 /** Alias. */ 205 public static final FTPCmd REINITIALIZE = REIN; 206 207 /** Alias. */ 208 public static final FTPCmd REMOVE_DIRECTORY = RMD; 209 210 /** Alias. */ 211 public static final FTPCmd RENAME_FROM = RNFR; 212 213 /** Alias. */ 214 public static final FTPCmd RENAME_TO = RNTO; 215 216 /** Alias. */ 217 public static final FTPCmd REPRESENTATION_TYPE = TYPE; 218 219 /** Alias. */ 220 public static final FTPCmd RESTART = REST; 221 222 /** Alias. */ 223 public static final FTPCmd RETRIEVE = RETR; 224 225 /** Alias. */ 226 public static final FTPCmd SET_MOD_TIME = MFMT; 227 228 /** Alias. */ 229 public static final FTPCmd SITE_PARAMETERS = SITE; 230 231 /** Alias. */ 232 public static final FTPCmd STATUS = STAT; 233 234 /** Alias. */ 235 public static final FTPCmd STORE = STOR; 236 237 /** Alias. */ 238 public static final FTPCmd STORE_UNIQUE = STOU; 239 240 /** Alias. */ 241 public static final FTPCmd STRUCTURE_MOUNT = SMNT; 242 243 /** Alias. */ 244 public static final FTPCmd SYSTEM = SYST; 245 246 /** Alias. */ 247 public static final FTPCmd TRANSFER_MODE = MODE; 248 249 /** Alias. */ 250 public static final FTPCmd USERNAME = USER; 251 252 /** 253 * Retrieve the FTP protocol command string corresponding to a specified command code. 254 * 255 * @return The FTP protcol command string corresponding to a specified command code. 256 */ 257 public final String getCommand() { 258 return name(); 259 } 260 261}