-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileType.java
More file actions
32 lines (25 loc) · 804 Bytes
/
Copy pathFileType.java
File metadata and controls
32 lines (25 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.termux.shared.file.filesystem;
/** The {@link Enum} that defines file types. */
public enum FileType {
NO_EXIST("no exist", 0), // 00000000
REGULAR("regular", 1), // 00000001
DIRECTORY("directory", 2), // 00000010
SYMLINK("symlink", 4), // 00000100
SOCKET("socket", 8), // 00001000
CHARACTER("character", 16), // 00010000
FIFO("fifo", 32), // 00100000
BLOCK("block", 64), // 01000000
UNKNOWN("unknown", 128); // 10000000
private final String name;
private final int value;
FileType(final String name, final int value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public int getValue() {
return value;
}
}