fun <ERROR CLASS><File>.hasDirectChild(expected: File): <ERROR CLASS>
Platform and version requirements: JVM
Asserts the file has the expected direct child.