public interface PathRequirements extends org.bitbucket.cowwoc.requirements.spi.ObjectRequirementsSpi<PathRequirements,Path>, Isolatable<PathRequirements>
Path parameter.| Modifier and Type | Method and Description |
|---|---|
PathRequirements |
exists()
Ensures that the parameter exists.
|
PathRequirements |
isAbsolute()
Ensures that the parameter is absolute.
|
PathRequirements |
isDirectory(LinkOption... options)
Ensures that the parameter refers to a directory.
|
PathRequirements |
isRegularFile(LinkOption... options)
Ensures that the parameter refers to a regular file.
|
PathRequirements |
isRelative()
Ensures that the parameter is relative.
|
addContext, isEqualTo, isEqualTo, isIn, isInstanceOf, isNotEqualTo, isNotEqualTo, isNotNull, isNull, withContext, withExceptionisolatePathRequirements exists() throws IllegalArgumentException
Note that the result of this method is immediately outdated. If this method indicates the file exists then there is no guarantee that a subsequence access will succeed. Care should be taken when using this method in security sensitive applications.
IllegalArgumentException - if parameter refers to a non-existent pathPathRequirements isAbsolute() throws IllegalArgumentException
IllegalArgumentException - if parameter refers to an absolute pathPathRequirements isDirectory(LinkOption... options) throws IllegalArgumentException, IOException
options - options indicating how symbolic links are handledIllegalArgumentException - if parameter refers to a non-existent or a non-directory pathIOException - if an I/O error occurs while reading the file attributesPathRequirements isRegularFile(LinkOption... options) throws IllegalArgumentException, IOException
options - options indicating how symbolic links are handledIllegalArgumentException - if parameter refers to a non-existent or a non-file pathIOException - if an I/O error occurs while reading the file attributesPathRequirements isRelative() throws IllegalArgumentException
IllegalArgumentException - if parameter refers to an absolute pathCopyright © 2016. All rights reserved.