parentFile

@get:JvmName(name = "parentFileOf")
val File.parentFile: File?(source)

The path parent File.

e.g.

assertEquals("hello".toFile(), "hello/world".toFile().parentFile)
assertNull("world".toFile().parentFile)

Return

The parent of path as a File, otherwise null if not available