PathHelper
It provides some useful method for handling the file path issue. version 1.0.1 - Added getRelativePath(String,String).
getRelativePath(String,String)
createPath
Create the path specified in parameter. This method will create any missing directory from the path.
getCanonicalPath
Get the canonical path from the basePath and relative path.
the canonical path from the “path”.
getExtension
Get the file extension from the specified path.
return the extension of the path. It returns empty string if the path is not directory or file without extension.
getFilename
Get the filename of the particular path. If the filename of the path does not exist, throws IOException.
getRelativePath
Get the relative path from the canoical basepath and path.
removeExtension
Remove the file extension from the specified path.
return the path without extension.
renameTo
Rename the file specified to the new name specified in parameters.
The new file object for the new path.