Package de.gurkenlabs.litiengine.util.io
Class FileUtilities
java.lang.Object
de.gurkenlabs.litiengine.util.io.FileUtilities
public final class FileUtilities
extends java.lang.Object
Method Summary
Modifier and Type Method Description static java.lang.String
combine(java.lang.String basePath, java.lang.String... paths)
This method combines the specified basepath with the parts provided as arguments.static boolean
deleteDir(java.io.File dir)
static java.util.List<java.lang.String>
findFiles(java.util.List<java.lang.String> fileNames, java.nio.file.Path dir, java.lang.String... files)
static java.util.List<java.lang.String>
findFilesByExtension(java.util.List<java.lang.String> fileNames, java.nio.file.Path dir, java.lang.String extension)
static java.lang.String
getExtension(java.io.File file)
static java.lang.String
getExtension(java.lang.String path)
static java.lang.String
getFileName(java.lang.String path)
static java.lang.String
getFileName(java.lang.String path, boolean extension)
static java.lang.String
getFileName(java.net.URL path)
static java.lang.String
getParentDirPath(java.lang.String uri)
static java.lang.String
getParentDirPath(java.net.URI uri)
Method Details
deleteDir
public static boolean deleteDir(java.io.File dir)findFilesByExtension
public static java.util.List<java.lang.String> findFilesByExtension(java.util.List<java.lang.String> fileNames, java.nio.file.Path dir, java.lang.String extension)findFiles
public static java.util.List<java.lang.String> findFiles(java.util.List<java.lang.String> fileNames, java.nio.file.Path dir, java.lang.String... files)getExtension
public static java.lang.String getExtension(java.io.File file)getExtension
public static java.lang.String getExtension(java.lang.String path)getFileName
public static java.lang.String getFileName(java.net.URL path)getFileName
public static java.lang.String getFileName(java.lang.String path)getFileName
public static java.lang.String getFileName(java.lang.String path, boolean extension)getParentDirPath
public static java.lang.String getParentDirPath(java.lang.String uri)getParentDirPath
public static java.lang.String getParentDirPath(java.net.URI uri)combine
public static java.lang.String combine(java.lang.String basePath, java.lang.String... paths)This method combines the specified basepath with the parts provided as arguments. The output will use the path separator of the current system;- Parameters:
basePath
- The base path for the combined path.paths
- The parts of the path to be constructed.- Returns:
- The combined path.