| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the base name of file namethe path of the file to obtain the base name of. path)Gets the base name (i.e. the part up to and not including the last ".") of the last path segment of a file name. |
| public static String | Returns: the base name of file namethe name of the file to obtain the base name of. fileName)
Deprecated
No longer used, no replacement.
Gets the base name (i.e. the part up to and not including the last ".") of the last path segment of a file name.
|
| public static String | Returns: the extension of file namethe path of the file to obtain the extension of. path)Gets the extension (i.e. the part after the last ".") of a file. |
| public static String | Returns: the extension of file namethe name of the file to obtain the extension of. fileName)
Deprecated
Use
Gets the extension (i.e. the part after the last ".") of a file.
FilenameUtils#getExtension(String).
|
| FileNameUtils | back to summary |
|---|---|
| public FileNameUtils() | |
| getBaseName | back to summary |
|---|---|
| public static String getBaseName(final Path path) Gets the base name (i.e. the part up to and not including the last ".") of the last path segment of a file name.
Will return the file name itself if it doesn't contain any dots. All leading directories of the | |
| getBaseName | back to summary |
|---|---|
| public static String getBaseName(final String fileName)
Deprecated No longer used, no replacement. Gets the base name (i.e. the part up to and not including the last ".") of the last path segment of a file name.
Will return the file name itself if it doesn't contain any dots. All leading directories of the | |
| getExtension | back to summary |
|---|---|
| public static String getExtension(final Path path) Gets the extension (i.e. the part after the last ".") of a file.
Will return an empty string if the file name doesn't contain any dots. Only the last segment of a the file name is consulted - i.e. all leading
directories of the | |
| getExtension | back to summary |
|---|---|
| public static String getExtension(final String fileName)
Deprecated Gets the extension (i.e. the part after the last ".") of a file.
Will return an empty string if the file name doesn't contain any dots. Only the last segment of a the file name is consulted - i.e. all leading
directories of the | |