IOUtils

object IOUtils

Utility methods for file-based operations.

Functions

Link copied to clipboard

Computes an SHA-256 digest that represents the current state of file.

Link copied to clipboard
fun isSubPath(parent: File, child: File): Boolean

Checks whether a child file is located in parent or any of its subdirectories. Symlinks are resolved to their real paths when possible, so that a symlink inside parent pointing outside it is correctly detected as not being a sub-path.

Link copied to clipboard
fun resolvePath(path: String, workingDirectory: File?): File

Resolves a File located in path, either relative or absolute. If the path is relative, the location is determined from the workingDirectory.