1 | /*
|
---|
2 | * Copyright 2001,2004-2005 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 |
|
---|
18 | package org.apache.tools.zip;
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Constants from stat.h on Unix systems.
|
---|
22 | *
|
---|
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 = 07777;
|
---|
32 | /**
|
---|
33 | * Indicates symbolic links.
|
---|
34 | *
|
---|
35 | * @since 1.1
|
---|
36 | */
|
---|
37 | int LINK_FLAG = 0120000;
|
---|
38 | /**
|
---|
39 | * Indicates plain files.
|
---|
40 | *
|
---|
41 | * @since 1.1
|
---|
42 | */
|
---|
43 | int FILE_FLAG = 0100000;
|
---|
44 | /**
|
---|
45 | * Indicates directories.
|
---|
46 | *
|
---|
47 | * @since 1.1
|
---|
48 | */
|
---|
49 | int DIR_FLAG = 040000;
|
---|
50 |
|
---|
51 | // ----------------------------------------------------------
|
---|
52 | // somewhat arbitrary choices that are quite common for shared
|
---|
53 | // installations
|
---|
54 | // -----------------------------------------------------------
|
---|
55 |
|
---|
56 | /**
|
---|
57 | * Default permissions for symbolic links.
|
---|
58 | *
|
---|
59 | * @since 1.1
|
---|
60 | */
|
---|
61 | int DEFAULT_LINK_PERM = 0777;
|
---|
62 | /**
|
---|
63 | * Default permissions for directories.
|
---|
64 | *
|
---|
65 | * @since 1.1
|
---|
66 | */
|
---|
67 | int DEFAULT_DIR_PERM = 0755;
|
---|
68 | /**
|
---|
69 | * Default permissions for plain files.
|
---|
70 | *
|
---|
71 | * @since 1.1
|
---|
72 | */
|
---|
73 | int DEFAULT_FILE_PERM = 0644;
|
---|
74 | }
|
---|