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 */ 018 019package org.apache.commons.net.ftp; 020 021/** 022* @since 3.3 023 */ 024public enum FTPCmd { 025 ABOR, 026 ACCT, 027 ALLO, 028 APPE, 029 CDUP, 030 CWD, 031 DELE, 032 EPRT, 033 EPSV, 034 FEAT, 035 HELP, 036 LIST, 037 MDTM, 038 MFMT, 039 MKD, 040 MLSD, 041 MLST, 042 MODE, 043 NLST, 044 NOOP, 045 PASS, 046 PASV, 047 PORT, 048 PWD, 049 QUIT, 050 REIN, 051 REST, 052 RETR, 053 RMD, 054 RNFR, 055 RNTO, 056 SITE, 057 /** @since 3.7 */ 058 SIZE, 059 SMNT, 060 STAT, 061 STOR, 062 STOU, 063 STRU, 064 SYST, 065 TYPE, 066 USER, 067 ; 068 069 // Aliases 070 071 public static final FTPCmd ABORT = ABOR; 072 public static final FTPCmd ACCOUNT = ACCT; 073 public static final FTPCmd ALLOCATE = ALLO; 074 public static final FTPCmd APPEND = APPE; 075 public static final FTPCmd CHANGE_TO_PARENT_DIRECTORY = CDUP; 076 public static final FTPCmd CHANGE_WORKING_DIRECTORY = CWD; 077 public static final FTPCmd DATA_PORT = PORT; 078 public static final FTPCmd DELETE = DELE; 079 public static final FTPCmd FEATURES = FEAT; 080 public static final FTPCmd FILE_STRUCTURE = STRU; 081 public static final FTPCmd GET_MOD_TIME = MDTM; 082 public static final FTPCmd LOGOUT = QUIT; 083 public static final FTPCmd MAKE_DIRECTORY = MKD; 084 public static final FTPCmd MOD_TIME = MDTM; 085 public static final FTPCmd NAME_LIST = NLST; 086 public static final FTPCmd PASSIVE = PASV; 087 public static final FTPCmd PASSWORD = PASS; 088 public static final FTPCmd PRINT_WORKING_DIRECTORY = PWD; 089 public static final FTPCmd REINITIALIZE = REIN; 090 public static final FTPCmd REMOVE_DIRECTORY = RMD; 091 public static final FTPCmd RENAME_FROM = RNFR; 092 public static final FTPCmd RENAME_TO = RNTO; 093 public static final FTPCmd REPRESENTATION_TYPE = TYPE; 094 public static final FTPCmd RESTART = REST; 095 public static final FTPCmd RETRIEVE = RETR; 096 public static final FTPCmd SET_MOD_TIME = MFMT; 097 public static final FTPCmd SITE_PARAMETERS = SITE; 098 public static final FTPCmd STATUS = STAT; 099 public static final FTPCmd STORE = STOR; 100 public static final FTPCmd STORE_UNIQUE = STOU; 101 public static final FTPCmd STRUCTURE_MOUNT = SMNT; 102 public static final FTPCmd SYSTEM = SYST; 103 public static final FTPCmd TRANSFER_MODE = MODE; 104 public static final FTPCmd USERNAME = USER; 105 106 /** 107 * Retrieve the FTP protocol command string corresponding to a specified 108 * command code. 109 * 110 * @return The FTP protcol command string corresponding to a specified 111 * command code. 112 */ 113 public final String getCommand() 114 { 115 return this.name(); 116 } 117 118}