1 /* 2 * Copyright 2001,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; 18 19 /** 20 * Constants from stat.h on Unix systems. 21 * 22 * from org.apache.ant.tools.zip.UnixStat v1.9 23 */ 24 public interface UnixStat { 25 26 /** 27 * Bits used for permissions (and sticky bit) 28 * 29 * @since 1.1 30 */ 31 int PERM_MASK = 0_7777; 32 33 /** 34 * Indicates symbolic links. 35 * 36 * @since 1.1 37 */ 38 int LINK_FLAG = 0_120000; 39 40 /** 41 * Indicates plain files. 42 * 43 * @since 1.1 44 */ 45 int FILE_FLAG = 0_100000; 46 47 /** 48 * Indicates directories. 49 * 50 * @since 1.1 51 */ 52 int DIR_FLAG = 0_40000; 53 54 // ---------------------------------------------------------- 55 // somewhat arbitrary choices that are quite common for shared 56 // installations 57 // ----------------------------------------------------------- 58 /** 59 * Default permissions for symbolic links. 60 * 61 * @since 1.1 62 */ 63 int DEFAULT_LINK_PERM = 0_777; 64 65 /** 66 * Default permissions for directories. 67 * 68 * @since 1.1 69 */ 70 int DEFAULT_DIR_PERM = 0_755; 71 72 /** 73 * Default permissions for plain files. 74 * 75 * @since 1.1 76 */ 77 int DEFAULT_FILE_PERM = 0_644; 78 }