Package com.diffplug.spotless
Class FileSignature
java.lang.Object
com.diffplug.spotless.FileSignature
- All Implemented Interfaces:
Serializable
Computes a signature for any needed files.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A view of `FileSignature` which can be safely roundtripped. -
Method Summary
Modifier and TypeMethodDescriptionfiles()
Returns all of the files in this signature, throwing an exception if there are more or less than 1 file.Returns the only file in this signature, throwing an exception if there are more or less than 1 file.static boolean
Returns true if this JVM is running on a windows machine.static String
pathNativeToUnix
(String pathNative) Transforms a native path to a unix one.static String
pathUnixToNative
(String pathUnix) Transforms a unix path to a native one.static FileSignature.Promised
static FileSignature.Promised
static FileSignature
signAsList
(File... files) Creates file signature whereas order of the files remains unchanged.static FileSignature
signAsList
(Iterable<File> files) Creates file signature whereas order of the files remains unchanged.static FileSignature
Creates file signature whereas order of the files remains unchanged.static FileSignature
Creates file signature insensitive to the order of the files.static String
Asserts that child is a subpath of root.
-
Method Details
-
signAsList
Creates file signature whereas order of the files remains unchanged.- Throws:
IOException
-
signAsList
Creates file signature whereas order of the files remains unchanged.- Throws:
IOException
-
signAsSet
Creates file signature whereas order of the files remains unchanged.- Throws:
IOException
-
signAsSet
Creates file signature insensitive to the order of the files.- Throws:
IOException
-
asPromise
-
promise
-
promise
-
files
Returns all of the files in this signature, throwing an exception if there are more or less than 1 file. -
getOnlyFile
Returns the only file in this signature, throwing an exception if there are more or less than 1 file. -
machineIsWin
public static boolean machineIsWin()Returns true if this JVM is running on a windows machine. -
pathNativeToUnix
Transforms a native path to a unix one. -
pathUnixToNative
Transforms a unix path to a native one. -
subpath
Asserts that child is a subpath of root. and returns the subpath.
-