public class FileKt
| Modifier and Type | Method and Description |
|---|---|
static Assert<kotlin.Array[]> |
bytes(Assert<? extends java.io.File> $receiver)
Returns an assert on the file's contents as bytes.
|
static void |
exists(Assert<? extends java.io.File> $receiver)
Asserts the file exists.
|
static Assert<java.lang.String> |
extension(Assert<? extends java.io.File> $receiver)
Returns an assert on the file's extension.
|
static void |
hasDirectChild(Assert<? extends java.io.File> $receiver,
java.io.File expected)
Asserts the file has the expected direct child.
|
static void |
hasExtension(Assert<? extends java.io.File> $receiver,
java.lang.String expected)
Asserts the file has the expected extension.
|
static void |
hasName(Assert<? extends java.io.File> $receiver,
java.lang.String expected)
Asserts the file has the expected name.
|
static void |
hasParent(Assert<? extends java.io.File> $receiver,
java.lang.String expected)
Asserts the file has the expected parent path.
|
static void |
hasPath(Assert<? extends java.io.File> $receiver,
java.lang.String expected)
Asserts the file has the expected path.
|
static void |
hasText(Assert<? extends java.io.File> $receiver,
java.lang.String expected,
java.nio.charset.Charset charset)
Asserts the file contains exactly the expected text (and nothing else).
|
static void |
isDirectory(Assert<? extends java.io.File> $receiver)
Asserts the file is a directory.
|
static void |
isFile(Assert<? extends java.io.File> $receiver)
Asserts the file is a simple file (not a directory).
|
static void |
isHidden(Assert<? extends java.io.File> $receiver)
Asserts the file is hidden.
|
static void |
isNotHidden(Assert<? extends java.io.File> $receiver)
Asserts the file is not hidden.
|
static Assert<java.lang.String> |
name(Assert<? extends java.io.File> $receiver)
Returns an assert on the file's name.
|
static Assert<java.lang.String> |
parent(Assert<? extends java.io.File> $receiver)
Returns an assert on the file's parent.
|
static Assert<java.lang.String> |
path(Assert<? extends java.io.File> $receiver)
Returns an assert on the file's path.
|
static Assert<java.lang.String> |
text(Assert<? extends java.io.File> $receiver,
java.nio.charset.Charset charset)
Returns an assert on the file's contents as text.
|
public static Assert<java.lang.String> name(Assert<? extends java.io.File> $receiver)
Returns an assert on the file's name.
public static Assert<java.lang.String> path(Assert<? extends java.io.File> $receiver)
Returns an assert on the file's path.
public static Assert<java.lang.String> parent(Assert<? extends java.io.File> $receiver)
Returns an assert on the file's parent.
public static Assert<java.lang.String> extension(Assert<? extends java.io.File> $receiver)
Returns an assert on the file's extension.
public static Assert<java.lang.String> text(Assert<? extends java.io.File> $receiver, java.nio.charset.Charset charset)
Returns an assert on the file's contents as text.
public static Assert<kotlin.Array[]> bytes(Assert<? extends java.io.File> $receiver)
Returns an assert on the file's contents as bytes.
public static void exists(Assert<? extends java.io.File> $receiver)
Asserts the file exists.
public static void isDirectory(Assert<? extends java.io.File> $receiver)
Asserts the file is a directory.
FileKt.isFilepublic static void isFile(Assert<? extends java.io.File> $receiver)
Asserts the file is a simple file (not a directory).
FileKt.isDirectorypublic static void isHidden(Assert<? extends java.io.File> $receiver)
Asserts the file is hidden.
FileKt.isNotHiddenpublic static void isNotHidden(Assert<? extends java.io.File> $receiver)
Asserts the file is not hidden.
FileKt.isHiddenpublic static void hasName(Assert<? extends java.io.File> $receiver, java.lang.String expected)
Asserts the file has the expected name.
public static void hasPath(Assert<? extends java.io.File> $receiver, java.lang.String expected)
Asserts the file has the expected path.
public static void hasParent(Assert<? extends java.io.File> $receiver, java.lang.String expected)
Asserts the file has the expected parent path.
public static void hasExtension(Assert<? extends java.io.File> $receiver, java.lang.String expected)
Asserts the file has the expected extension.
public static void hasText(Assert<? extends java.io.File> $receiver, java.lang.String expected, java.nio.charset.Charset charset)
Asserts the file contains exactly the expected text (and nothing else).
charset - The character set of the file, default is Charsets.UTF_8public static void hasDirectChild(Assert<? extends java.io.File> $receiver, java.io.File expected)
Asserts the file has the expected direct child.