    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one
    003 * or more contributor license agreements.  See the NOTICE file
    004 * distributed with this work for additional information
    005 * regarding copyright ownership.  The ASF licenses this file
    006 * to you under the Apache License, Version 2.0 (the
    007 * "License"); you may not use this file except in compliance
    008 * with the License.  You may obtain a copy of the License at
    009 *
    010 *   https://www.apache.org/licenses/LICENSE-2.0
    011 *
    012 * Unless required by applicable law or agreed to in writing,
    013 * software distributed under the License is distributed on an
    014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    015 * KIND, either express or implied.  See the License for the
    016 * specific language governing permissions and limitations
    017 * under the License.
    018 */
    019package org.apache.commons.compress.archivers.zip;
    020
    021/**
    022 * Constants from stat.h on Unix systems.
    023 * <p>
    024 * TODO This will be an class in 2.0.
    025 * </p>
    026 */
    027// CheckStyle:InterfaceIsTypeCheck OFF - backward compatible
    028public interface UnixStat {
    029
    030    /**
    031     * Masks permissions (and sticky bit)
    032     */
    033    int PERM_MASK = 07777;
    034
    035    /**
    036     * Masks the file system object type.
    037     *
    038     * @since 1.14
    039     */
    040    int FILE_TYPE_FLAG = 0170000;
    041
    042    /**
    043     * Masks symbolic links.
    044     */
    045    int LINK_FLAG = 0120000;
    046
    047    /**
    048     * Masks plain files.
    049     */
    050    int FILE_FLAG = 0100000;
    051
    052    /**
    053     * Masks directories.
    054     */
    055    int DIR_FLAG = 040000;
    056
    057    //
    058    // Arbitrary choices that are quite common for shared installations.
    059    //
    060
    061    /**
    062     * Default permissions for all permissions.
    063     */
    064    int DEFAULT_LINK_PERM = 0777;
    065
    066    /**
    067     * Default permissions for directories.
    068     */
    069    int DEFAULT_DIR_PERM = 0755;
    070
    071    /**
    072     * Default permissions for plain files.
    073     */
    074    int DEFAULT_FILE_PERM = 0644;
    075}