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 SMNT, 058 STAT, 059 STOR, 060 STOU, 061 STRU, 062 SYST, 063 TYPE, 064 USER, 065 ; 066 067 // Aliases 068 069 public static final FTPCmd ABORT = ABOR; 070 public static final FTPCmd ACCOUNT = ACCT; 071 public static final FTPCmd ALLOCATE = ALLO; 072 public static final FTPCmd APPEND = APPE; 073 public static final FTPCmd CHANGE_TO_PARENT_DIRECTORY = CDUP; 074 public static final FTPCmd CHANGE_WORKING_DIRECTORY = CWD; 075 public static final FTPCmd DATA_PORT = PORT; 076 public static final FTPCmd DELETE = DELE; 077 public static final FTPCmd FEATURES = FEAT; 078 public static final FTPCmd FILE_STRUCTURE = STRU; 079 public static final FTPCmd GET_MOD_TIME = MDTM; 080 public static final FTPCmd LOGOUT = QUIT; 081 public static final FTPCmd MAKE_DIRECTORY = MKD; 082 public static final FTPCmd MOD_TIME = MDTM; 083 public static final FTPCmd NAME_LIST = NLST; 084 public static final FTPCmd PASSIVE = PASV; 085 public static final FTPCmd PASSWORD = PASS; 086 public static final FTPCmd PRINT_WORKING_DIRECTORY = PWD; 087 public static final FTPCmd REINITIALIZE = REIN; 088 public static final FTPCmd REMOVE_DIRECTORY = RMD; 089 public static final FTPCmd RENAME_FROM = RNFR; 090 public static final FTPCmd RENAME_TO = RNTO; 091 public static final FTPCmd REPRESENTATION_TYPE = TYPE; 092 public static final FTPCmd RESTART = REST; 093 public static final FTPCmd RETRIEVE = RETR; 094 public static final FTPCmd SET_MOD_TIME = MFMT; 095 public static final FTPCmd SITE_PARAMETERS = SITE; 096 public static final FTPCmd STATUS = STAT; 097 public static final FTPCmd STORE = STOR; 098 public static final FTPCmd STORE_UNIQUE = STOU; 099 public static final FTPCmd STRUCTURE_MOUNT = SMNT; 100 public static final FTPCmd SYSTEM = SYST; 101 public static final FTPCmd TRANSFER_MODE = MODE; 102 public static final FTPCmd USERNAME = USER; 103 104 /** 105 * Retrieve the FTP protocol command string corresponding to a specified 106 * command code. 107 * 108 * @return The FTP protcol command string corresponding to a specified 109 * command code. 110 */ 111 public final String getCommand() 112 { 113 return this.name(); 114 } 115 116}