function SandboxManagerBase::sandboxDirectoryExists
Same name and namespace in other branches
- 11.x core/modules/package_manager/src/SandboxManagerBase.php \Drupal\package_manager\SandboxManagerBase::sandboxDirectoryExists()
Determines if there is an active sandbox with a directory on disk.
This checks both that the sandbox manager is currently claimed (i.e., has an active lock) and that the sandbox directory physically exists. A sandbox directory that exists on disk but has no active lock (e.g., a long-lived sandbox after destroy()) is not considered active.
Return value
bool TRUE if the sandbox manager is claimed and the sandbox directory exists on disk, otherwise FALSE.
File
-
core/
modules/ package_manager/ src/ SandboxManagerBase.php, line 803
Class
- SandboxManagerBase
- Creates and manages a sandbox directory in which to install or update code.
Namespace
Drupal\package_managerCode
public function sandboxDirectoryExists() : bool {
if ($this->isAvailable()) {
return FALSE;
}
return is_dir($this->getSandboxDirectory());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.