api / org.gradle.api.file / FileVisitor

FileVisitor

interface FileVisitor

A FileVisitor is used to visit each of the files in a FileTree.

Functions

visitDir

abstract fun visitDir(dirDetails: FileVisitDetails): Unit

Visits a directory.

visitFile

abstract fun visitFile(fileDetails: FileVisitDetails): Unit

Visits a file.

Inheritors

EmptyFileVisitor

open class EmptyFileVisitor : FileVisitor

The EmptyFileVisitor can be extends by implementations that only require to implement one of the 2 visit methods (dir or file). This is just to limit the amount of code clutter when not both visit methods need to be implemented.

ReproducibleFileVisitor

interface ReproducibleFileVisitor : FileVisitor

Visitor which can request a reproducible file order.