CleanRefusal

sealed interface CleanRefusal

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.

Inheritors

Types

Link copied to clipboard
data class ContainsSourceFile(val source: File) : CleanRefusal

The directory (recursively) contains the main source file of the compilation.

Link copied to clipboard

The directory is a filesystem root (e.g. / on Unix, C:\ on Windows).

Link copied to clipboard

The directory is the user's home directory.

Link copied to clipboard

The directory looks like the root of a source-controlled project (it contains a .git entry).

Link copied to clipboard

The directory is the current working directory the CLI was invoked from.

Properties

Link copied to clipboard
abstract val message: String

Human-readable explanation of why the directory cannot be cleaned.