public class FilenameUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
REPLACEMENT_CHARACTER
Replaces "unsafe" characters in file names (see
UNSAFE_FILENAME_CHARACTERS ). |
private static java.util.regex.Pattern |
UNSAFE_FILENAME_CHARACTERS
Matches all characters that are considered "unsafe" for file names.
|
Modifier | Constructor and Description |
---|---|
private |
FilenameUtils()
Private constructor to prevent instantiation.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
quoteName(java.lang.String name)
Converts a file name to a "safe" form.
|
@NotNull private static final java.lang.String REPLACEMENT_CHARACTER
UNSAFE_FILENAME_CHARACTERS
).@NotNull private static final java.util.regex.Pattern UNSAFE_FILENAME_CHARACTERS
REPLACEMENT_CHARACTER
.private FilenameUtils()
@NotNull public static java.lang.String quoteName(@NotNull java.lang.String name)
UNSAFE_FILENAME_CHARACTERS
),
and it will not be empty.name
- the file name to convert