1 /*
2  * Copyright (C) 2022 The Android Open Source Project
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 com.android.server.art;
18 
19 /**
20  * Indicates the visibility of a file. I.e., whether the file has the "read" bit for "others"
21  * (S_IROTH).
22  *
23  * Theoretically, even if the value is {@code OTHER_READABLE}, others' access can still be denied
24  * due to the lack of the "exec" bit on parent directories. However, for compilation artifacts, all
25  * parent directories do have the "exec" bit for "others" in practice.
26  *
27  * @hide
28  */
29 @Backing(type="int")
30 enum FileVisibility {
31     NOT_FOUND = 0,
32     OTHER_READABLE = 1,
33     NOT_OTHER_READABLE = 2,
34 }
35