assert_size_of_file

Assert File Size

Checks that a regular file exists and has the expected size in bytes.

Parameters

Returns

True if the file exists and has the expected size.

Examples

assert_size_of_file("output.csv", 128)
assert_size_of_file("report.html", 0, "report should be empty")

See Also

assert_file_exists