public class PathUtils extends Object
Constructor and Description |
---|
PathUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getCollectionName(File collectionRoot,
File file)
Create a filename of the given path relative to the collection root dir.
|
static File |
getFile(String path,
File hvscRoot,
File cgscRoot)
Get file for a given path.
|
static String |
getFilenameSuffix(String filename)
Get suffix of a filename.
|
static String |
getFilenameWithoutSuffix(String filename)
Strip suffix of a filename.
|
static List<File> |
getFiles(String path,
File rootFile,
FileFilter fileFilter)
Get the file list of the given file path.
|
public static final String getCollectionName(File collectionRoot, File file)
collectionRoot
- root file of the pathfile
- file to get the relative path forpublic static final File getFile(String path, File hvscRoot, File cgscRoot)
path
- path to get a file for, possible root directory can be either
hvscRoot or cgscRoot or none, if absolutehvscRoot
- root of HVSCcgscRoot
- root of CGSCpublic static final List<File> getFiles(String path, File rootFile, FileFilter fileFilter)
path
- file path to get the file list for. Each path segment is
delimited by slash or backslash.rootFile
- Root file to start. The first path segment must match a direct
child of rootPath and so on.fileFilter
- Files contained in the file filter are visible as child files
(null means filter disabled)public static final String getFilenameWithoutSuffix(String filename)
filename
- filename to get the suffix forCopyright © 2018 Ken Händel. All rights reserved.