termux-app

Форк
0
157 строк · 5.2 Кб
1

2
/*
3
 * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
4
 *
5
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6
 *
7
 * This code is free software; you can redistribute it and/or modify it
8
 * under the terms of the GNU General Public License version 2 only, as
9
 * published by the Free Software Foundation.  Oracle designates this
10
 * particular file as subject to the "Classpath" exception as provided
11
 * by Oracle in the LICENSE file that accompanied this code.
12
 *
13
 * This code is distributed in the hope that it will be useful, but WITHOUT
14
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16
 * version 2 for more details (a copy is included in the LICENSE file that
17
 * accompanied this code).
18
 *
19
 * You should have received a copy of the GNU General Public License version
20
 * 2 along with this work; if not, write to the Free Software Foundation,
21
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22
 *
23
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
24
 * or visit www.oracle.com if you need additional information or have any
25
 * questions.
26
 *
27
 */
28
// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
29
package com.termux.shared.file.filesystem;
30

31
// BEGIN Android-changed: Use constants from android.system.OsConstants. http://b/32203242
32
// Those constants are initialized by native code to ensure correctness on different architectures.
33
// AT_SYMLINK_NOFOLLOW (used by fstatat) and AT_REMOVEDIR (used by unlinkat) as of July 2018 do not
34
// have equivalents in android.system.OsConstants so left unchanged.
35
import android.os.Build;
36
import android.system.OsConstants;
37

38
import androidx.annotation.RequiresApi;
39

40
/**
41
 * https://cs.android.com/android/platform/superproject/+/android-11.0.0_r3:libcore/ojluni/src/main/java/sun/nio/fs/UnixConstants.java
42
 */
43
public class UnixConstants {
44
    private UnixConstants() { }
45

46
    static final int O_RDONLY = OsConstants.O_RDONLY;
47

48
    static final int O_WRONLY = OsConstants.O_WRONLY;
49

50
    static final int O_RDWR = OsConstants.O_RDWR;
51

52
    static final int O_APPEND = OsConstants.O_APPEND;
53

54
    static final int O_CREAT = OsConstants.O_CREAT;
55

56
    static final int O_EXCL = OsConstants.O_EXCL;
57

58
    static final int O_TRUNC = OsConstants.O_TRUNC;
59

60
    static final int O_SYNC = OsConstants.O_SYNC;
61

62
    // Crash on Android 5.
63
    // No static field O_DSYNC of type I in class Landroid/system/OsConstants; or its superclasses
64
    // (declaration of 'android.system.OsConstants' appears in /system/framework/core-libart.jar)
65
    //@RequiresApi(Build.VERSION_CODES.O_MR1)
66
    //static final int O_DSYNC = OsConstants.O_DSYNC;
67

68
    static final int O_NOFOLLOW = OsConstants.O_NOFOLLOW;
69

70
    static final int S_IAMB = get_S_IAMB();
71

72
    static final int S_IRUSR = OsConstants.S_IRUSR;
73

74
    static final int S_IWUSR = OsConstants.S_IWUSR;
75

76
    static final int S_IXUSR = OsConstants.S_IXUSR;
77

78
    static final int S_IRGRP = OsConstants.S_IRGRP;
79

80
    static final int S_IWGRP = OsConstants.S_IWGRP;
81

82
    static final int S_IXGRP = OsConstants.S_IXGRP;
83

84
    static final int S_IROTH = OsConstants.S_IROTH;
85

86
    static final int S_IWOTH = OsConstants.S_IWOTH;
87

88
    static final int S_IXOTH = OsConstants.S_IXOTH;
89

90
    static final int S_IFMT = OsConstants.S_IFMT;
91

92
    static final int S_IFREG = OsConstants.S_IFREG;
93

94
    static final int S_IFDIR = OsConstants.S_IFDIR;
95

96
    static final int S_IFLNK = OsConstants.S_IFLNK;
97

98
    static final int S_IFSOCK = OsConstants.S_IFSOCK;
99

100
    static final int S_IFCHR = OsConstants.S_IFCHR;
101

102
    static final int S_IFBLK = OsConstants.S_IFBLK;
103

104
    static final int S_IFIFO = OsConstants.S_IFIFO;
105

106
    static final int R_OK = OsConstants.R_OK;
107

108
    static final int W_OK = OsConstants.W_OK;
109

110
    static final int X_OK = OsConstants.X_OK;
111

112
    static final int F_OK = OsConstants.F_OK;
113

114
    static final int ENOENT = OsConstants.ENOENT;
115

116
    static final int EACCES = OsConstants.EACCES;
117

118
    static final int EEXIST = OsConstants.EEXIST;
119

120
    static final int ENOTDIR = OsConstants.ENOTDIR;
121

122
    static final int EINVAL = OsConstants.EINVAL;
123

124
    static final int EXDEV = OsConstants.EXDEV;
125

126
    static final int EISDIR = OsConstants.EISDIR;
127

128
    static final int ENOTEMPTY = OsConstants.ENOTEMPTY;
129

130
    static final int ENOSPC = OsConstants.ENOSPC;
131

132
    static final int EAGAIN = OsConstants.EAGAIN;
133

134
    static final int ENOSYS = OsConstants.ENOSYS;
135

136
    static final int ELOOP = OsConstants.ELOOP;
137

138
    static final int EROFS = OsConstants.EROFS;
139

140
    static final int ENODATA = OsConstants.ENODATA;
141

142
    static final int ERANGE = OsConstants.ERANGE;
143

144
    static final int EMFILE = OsConstants.EMFILE;
145

146
    // S_IAMB are access mode bits, therefore, calculated by taking OR of all the read, write and
147
    // execute permissions bits for owner, group and other.
148
    private static int get_S_IAMB() {
149
        return (OsConstants.S_IRUSR | OsConstants.S_IWUSR | OsConstants.S_IXUSR |
150
            OsConstants.S_IRGRP | OsConstants.S_IWGRP | OsConstants.S_IXGRP |
151
            OsConstants.S_IROTH | OsConstants.S_IWOTH | OsConstants.S_IXOTH);
152
    }
153
    // END Android-changed: Use constants from android.system.OsConstants. http://b/32203242
154

155

156
    static final int AT_SYMLINK_NOFOLLOW = 0x100;
157
    static final int AT_REMOVEDIR = 0x200;
158
}
159

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.