public final class DynamicPath
extends java.lang.Object
Constructor | Description |
---|---|
DynamicPath(java.lang.String path) |
Modifier and Type | Method | Description |
---|---|---|
java.util.List<FileTuple> |
getAllFiles(java.lang.String backupSuffix) |
Gets all original files and backup files that are compatible with the dynamic path.
|
boolean |
isValid(java.io.File file) |
Checks if an already existing file is compatible with this dynamic path.
|
java.lang.String |
resolve() |
Resolves all patterns and generates a real path for a (new) file.
|
public DynamicPath(java.lang.String path)
path
- Path with patternsjava.lang.IllegalArgumentException
- Path contains invalid or incomplete patternspublic java.lang.String resolve()
public java.util.List<FileTuple> getAllFiles(java.lang.String backupSuffix)
backupSuffix
- Optional file extension for backup files (can be null
if there are no separate backup files)public boolean isValid(java.io.File file)
file
- File to checktrue
if passed file is compatible, false
if notCopyright © 2022. All rights reserved.