public class FileHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getExtension(java.lang.String path)
get the the extension of a filename or path
|
static java.lang.String |
getNameWithoutExt(java.lang.String fileName)
get the filename without the extension and path
|
static java.io.File |
getNextAvailableFile(java.io.File original)
from the give file will make the next file in a sequence given that it does not exist
|
public static final java.lang.String getNameWithoutExt(java.lang.String fileName)
/my/path/notes.txt will return notes.
fileName - String a filename or file pathpublic static final java.lang.String getExtension(java.lang.String path)
/my/path/notes.txt will return txt.
path - String a filename or file pathpublic static final java.io.File getNextAvailableFile(java.io.File original)
/my/path/note.txt will become /my/path/note-1.txt
/my/path/note.txt will become /my/path/note-2.txt, if note-1.txt exists
original - File the orginal file