Package-level declarations
Types
Link copied to clipboard
Reason why cleaning a directory is refused for safety. Combined with --clean, accidental targeting of a sensitive directory could result in irreversible data loss, so the CLI refuses any of these cases up front.
Link copied to clipboard
class MillisStopwatch
Simple immutable stopwatch to measure elapsed time in milliseconds.
Functions
Link copied to clipboard
fun File.checkCleanSafety(sourceFile: File?, homeDirectory: File? = systemDirectory("user.home"), workingDirectory: File? = systemDirectory("user.dir")): CleanRefusal?
Decides whether this directory can be safely wiped by the CLI --clean flag.
Link copied to clipboard
Cleans this directory by deleting all files and directories inside it. Does nothing if the directory is empty or if the file does not exist or is not a directory.
Link copied to clipboard
fun <T> runWithTimeout(timeoutSeconds: Int?, onTimeout: (ExecutionTimeoutException) -> T? = null, action: () -> T): T
Runs action with an optional timeout. If timeoutSeconds is null or non-positive, action is executed directly on the current thread. Otherwise, it is submitted and bounded by the given duration.