30 throw new \InvalidArgumentException(
45 return hash(
"sha256", self::class .
"::" . $this->path);
53 return "Create directory '{$this->path}'";
71 if (file_exists($this->path)) {
84 if (!file_exists($this->path)) {
85 mkdir($this->path, $this->permissions);
87 if (!is_dir($this->path)) {
89 "Could not create directory '{$this->path}'"
An exception for terminatinating execution or to throw for unit testing.
const DEFAULT_DIRECTORY_PERMISSIONS
isNotable()
Defaults to 'true'.
achieve(Environment $environment)
@inheritdocs
__construct(string $path, int $permissions=self::DEFAULT_DIRECTORY_PERMISSIONS)
getHash()
Uses hashed Path.
getPreconditions(Environment $environment)
@inheritdocs
Signals that some goal won't be achievable by actions of the system ever.
An environment holds resources to be used in the setup process.
An objective is a desired state of the system that is supposed to be created by the setup.