1 /* 2 * Copyright 2000-2004 The Apache Software Foundation 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 package org.codehaus.plexus.archiver.tar; 18 19 /** 20 * Set of options for long file handling in the task. 21 */ 22 public enum TarLongFileMode { 23 warn, 24 fail, 25 truncate, 26 gnu, 27 omit, 28 posix, 29 posix_warn; 30 31 /** 32 * @return true if value is "truncate". 33 */ 34 public boolean isTruncateMode() { 35 return truncate.equals(this); 36 } 37 38 /** 39 * @return true if value is "warn". 40 */ 41 public boolean isWarnMode() { 42 return warn.equals(this); 43 } 44 45 /** 46 * @return true if value is "gnu". 47 */ 48 public boolean isGnuMode() { 49 return gnu.equals(this); 50 } 51 52 /** 53 * @return true if value is "fail". 54 */ 55 public boolean isFailMode() { 56 return fail.equals(this); 57 } 58 59 /** 60 * @return true if value is "omit". 61 */ 62 public boolean isOmitMode() { 63 return omit.equals(this); 64 } 65 66 /** 67 * @return true if value is "posix". 68 */ 69 public boolean isPosixMode() { 70 return posix.equals(this); 71 } 72 73 /** 74 * @return true if value is "posix_warn". 75 */ 76 public boolean isPosixWarnMode() { 77 return posix_warn.equals(this); 78 } 79 }