Package org.hamcrest.io
Class FileMatchers
java.lang.Object
org.hamcrest.io.FileMatchers
Matchers for properties of files.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final FileMatchers.FileStatusChecks if aFileis readable.static final FileMatchers.FileStatusChecks if aFileis writable.static final FileMatchers.FileStatusChecks if aFileis a exists.static final FileMatchers.FileStatusChecks if aFileis a directory.static final FileMatchers.FileStatusChecks if aFileis a file.
- 
Method SummaryModifier and TypeMethodDescriptionaFileNamed(Matcher<String> expected) A matcher that checks if a file name matches an expected name.aFileWithAbsolutePath(Matcher<String> expected) A matcher that checks if a file absolute path matches an expected path.aFileWithCanonicalPath(Matcher<String> expected) A matcher that checks if a file canonical path matches an expected path.aFileWithSize(long size) A matcher that checks if a file has a specific size.aFileWithSize(Matcher<Long> expected) A matcher that checks if a file size matches an expected size.A matcher that checks if a directory exists.A matcher that checks if a file exists.A matcher that checks if a file or directory exists.A matcher that checks if a file is readable.A matcher that checks if a directory is writable.
- 
Field Details
- 
Method Details- 
anExistingDirectoryA matcher that checks if a directory exists.- Returns:
- the file matcher
 
- 
anExistingFileOrDirectoryA matcher that checks if a file or directory exists.- Returns:
- the file matcher
 
- 
anExistingFileA matcher that checks if a file exists.- Returns:
- the file matcher
 
- 
aReadableFileA matcher that checks if a file is readable.- Returns:
- the file matcher
 
- 
aWritableFileA matcher that checks if a directory is writable.- Returns:
- the file matcher
 
- 
aFileWithSizeA matcher that checks if a file has a specific size.- Parameters:
- size- the expected size
- Returns:
- the file matcher
 
- 
aFileWithSizeA matcher that checks if a file size matches an expected size.- Parameters:
- expected- matcher for the expected size
- Returns:
- the file matcher
 
- 
aFileNamedA matcher that checks if a file name matches an expected name.- Parameters:
- expected- the expected name
- Returns:
- the file matcher
 
- 
aFileWithCanonicalPathA matcher that checks if a file canonical path matches an expected path.- Parameters:
- expected- the expected path
- Returns:
- the file matcher
 
- 
aFileWithAbsolutePathA matcher that checks if a file absolute path matches an expected path.- Parameters:
- expected- the expected path
- Returns:
- the file matcher
 
 
-