Various file utilities.
| Modifiers | Name | Description |
|---|---|---|
static java.util.regex.Pattern |
SAFE_FILENAME_REGEX |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static FileCollection |
filesFromCopySpec(CopySpec copySpec)Returns the file collection that a CopySpec describes. |
|
static java.util.List<File> |
listDirs(File distDir)Provides a list of directories below another directory |
|
static File |
projectCacheDirFor(Project project)Returns the project cache directory for the given project. |
|
static org.ysb33r.grolifant.api.core.ClassLocation |
resolveClassLocation(Class aClass)Returns the classpath location for a specific class |
|
static File |
toSafeFile(String... parts)Converts a collection of String into a {@@link File} with all parts guarantee to be safe file parts |
|
static String |
toSafeFileName(String name)Converts a string into a string that is safe to use as a file name. |
|
static java.nio.file.Path |
toSafePath(String... parts)Converts a collection of String into a java.nio.file.Path with all parts guarantee to be safe file parts |
Returns the file collection that a CopySpec describes.
copySpec - An instance of a CopySpecProvides a list of directories below another directory
distDir - Directorynull
supplied directory.Returns the project cache directory for the given project.
project - Project to query.null.Returns the classpath location for a specific class
aClass - Class to find.null which means class has been found, but cannot be placed
on classpathConverts a collection of String into a {@
parts - File path partsConverts a string into a string that is safe to use as a file name. T The result will only include ascii characters and numbers, and the "-","_", #, $ and "." characters.
A - potential file nameConverts a collection of String into a java.nio.file.Path with all parts guarantee to be safe file parts
parts - File path parts