public final class FileUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Mono<Path> |
compress(Path candidate)
Compresses a candidate
Path if it is a directory. |
static Mono<Path> |
compress(Path candidate,
Predicate<String> filter)
Compresses a candidate
Path filtering out entries |
static String |
getRelativePathName(Path root,
Path path)
Get the relative path of an application
|
static String |
hash(InputStream in)
Calculates the SHA-1 hash for an
InputStream |
static String |
hash(Path path)
Calculates the SHA-1 hash for a
Path |
static String |
permissions(int mode)
Calculates permissions for a UNIX mode
|
static String |
permissions(Path path)
Calculates permissions for a
Path |
static int |
size(Path path)
Calculates the size of a
Path |
public static Mono<Path> compress(Path candidate, Predicate<String> filter)
Path filtering out entriespublic static String getRelativePathName(Path root, Path path)
root - the root to relativize againstpath - the path to relativizepublic static String hash(InputStream in)
InputStreamin - the InputStream to calculate the hash forString representation of the hashpublic static String permissions(int mode)
mode - the UNIX mode to calculate the permissions forString representation of the permissionsCopyright © 2017 Pivotal Software, Inc.. All rights reserved.