net.dankito.utils.filesystem.IFileSystemWalker.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-utils Show documentation
Show all versions of java-utils Show documentation
Some basic utils needed in many projects
The newest version!
package net.dankito.utils.filesystem
import java.nio.file.FileVisitResult
import java.nio.file.Path
interface IFileSystemWalker {
fun listFiles(startDir: Path): List
fun listFilesAndFolders(startDir: Path): FileSystemWalkResult
fun walk(startDir: Path, discoveredFileCallback: (Path) -> Unit)
fun listAllFilesAndFoldersWalk(startDir: Path, preVisitDirectory: ((directory: VisitedFile) -> Unit)?,
visitedFileCallback: (VisitedFile) -> Unit)
fun detailedWalk(startDir: Path, abortOnError: Boolean = false,
preVisitDirectory: ((directory: VisitedFile) -> FileVisitResult?)? = null,
postVisitDirectory: ((directory: VisitedFile) -> FileVisitResult?)? = null,
visitedFileCallback: (VisitedFile) -> FileVisitResult?)
}