public enum FileType extends Enum<FileType>
Enum Constant and Description |
---|
BLOCK_DEVICE_FILE
块设备文件
|
CHARACTER_DEVICE_FILE
字符设备文件
|
DIRECTORY
目录
|
MANAGE_FILE
管理文件
|
REGULAR_FILE
普通文件
|
SOCKET_FILE
套接字文件
|
SYMLINK
链接文件
|
Modifier and Type | Method and Description |
---|---|
String |
getSymbol() |
String |
getTypeName() |
boolean |
isMatch(String entity)
是否匹配文件类型
|
static FileType |
of(String entity) |
static FileType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FileType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FileType REGULAR_FILE
public static final FileType DIRECTORY
public static final FileType SYMLINK
public static final FileType MANAGE_FILE
public static final FileType BLOCK_DEVICE_FILE
public static final FileType CHARACTER_DEVICE_FILE
public static final FileType SOCKET_FILE
public static FileType[] values()
for (FileType c : FileType.values()) System.out.println(c);
public static FileType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isMatch(String entity)
entity
- entitypublic String getSymbol()
public String getTypeName()
Copyright © 2024. All rights reserved.