function vfsStreamWrapper::doUnlink
removes a path
Parameters
string $path:
Return value
bool
2 calls to vfsStreamWrapper::doUnlink()
- vfsStreamWrapper::rename in vendor/
mikey179/ vfsstream/ src/ main/ php/ org/ bovigo/ vfs/ vfsStreamWrapper.php - rename from one path to another
- vfsStreamWrapper::unlink in vendor/
mikey179/ vfsstream/ src/ main/ php/ org/ bovigo/ vfs/ vfsStreamWrapper.php - remove the data under the given path
File
-
vendor/
mikey179/ vfsstream/ src/ main/ php/ org/ bovigo/ vfs/ vfsStreamWrapper.php, line 766
Class
- vfsStreamWrapper
- Stream wrapper to mock file system requests.
Namespace
org\bovigo\vfsCode
protected function doUnlink($path) {
if (self::$root->getName() === $path) {
// delete root? very brave. :)
self::$root = null;
clearstatcache();
return true;
}
$names = $this->splitPath($path);
$content = $this->getContent($names['dirname']);
if (!$content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
return false;
}
clearstatcache();
return $content->removeChild($names['basename']);
}