@ParametersAreNonnullByDefault public final class MoreFiles extends Object
Files.| Modifier and Type | Method and Description |
|---|---|
static String |
fileExtension(File file)
Returns the file extension for the given
file, or the empty string if the file has no extension. |
static String |
fileExtension(String fullName)
Returns the file extension for the given file name, or the empty string if the fullName has no extension.
|
static String |
nameWithoutExtension(File file)
Returns the
file name without its file extension or path. |
static String |
nameWithoutExtension(String fullName)
Returns the file name without its fullName extension or path.
|
@Nonnull public static String fileExtension(File file)
file, or the empty string if the file has no extension. The
result does not include the '.'.file - the file@Nonnull public static String fileExtension(String fullName)
.'.fullName - the file name@Nonnull public static String nameWithoutExtension(File file)
file name without its file extension or path. This is similar to the basename unix
command. The result does not include the '.'.file - the file@Nonnull public static String nameWithoutExtension(String fullName)
basename unix
command. The result does not include the '.'.fullName - the file nameCopyright © 2017–2019 Atlanmod. All rights reserved.