public final class PathFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PathFactory.PathImpl |
| Modifier and Type | Field and Description |
|---|---|
static String |
LOCK_FILE_EXTENSION |
static String |
VERSION_PROPERTY |
| Modifier and Type | Method and Description |
|---|---|
static Path |
fromLock(Path lockPath)
Returns the path of the locked file for the provided lock.
|
static Path |
newLock(Path path) |
static Path |
newLockPath(Path path)
Returns a path of a lock for the provided file.
|
static Path |
newPath(String fileName,
String uri) |
static Path |
newPath(String fileName,
String uri,
Map<String,Object> attrs) |
static Path |
newPathBasedOn(String fileName,
String uri,
Path path) |
public static final String LOCK_FILE_EXTENSION
public static String VERSION_PROPERTY
public static Path newLockPath(Path path)
Examples:
default://master@repo/some/path/to/file.txt => default://locks@system/repo/master/some/path/to/file.txt.ulock file:\\master@repo\some\path\to\file.txt => file:\\locks@system\repo\master\some\path\to\file.txt.ulock
path - the path of a file for which a lock should be created, must not be null.public static Path fromLock(Path lockPath)
Examples:
default://locks@system/repo/master/some/path/to/file.txt.ulock => default://master@repo/some/path/to/file.txt file:\\locks@system\repo\master\some\path\to\file.txt.ulock => file:\\master@repo\some\path\to\file.txt
lockPath - the path of a lock, must not be null.Copyright © 2012–2017 JBoss by Red Hat. All rights reserved.