[android-components](../../index.md) / [mozilla.components.support.ktx.java.io](../index.md) / [java.io.File](index.md) / [truncateDirectory](./truncate-directory.md)

# truncateDirectory

`fun `[`File`](http://docs.oracle.com/javase/7/docs/api/java/io/File.html)`.truncateDirectory(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/java/io/File.kt#L13)

Removes all files in the directory named by this abstract pathname. Does nothing if the [File](http://docs.oracle.com/javase/7/docs/api/java/io/File.html) is not pointing to
a directory.

