function vfsStreamWrapper::doPermChange
executes given permission change when necessary rights allow such a change
Parameters
string $path:
vfsStreamAbstractContent $content:
\Closure $change:
Return value
bool
1 call to vfsStreamWrapper::doPermChange()
- vfsStreamWrapper::stream_metadata in vendor/
mikey179/ vfsstream/ src/ main/ php/ org/ bovigo/ vfs/ vfsStreamWrapper.php - sets metadata like owner, user or permissions
File
-
vendor/
mikey179/ vfsstream/ src/ main/ php/ org/ bovigo/ vfs/ vfsStreamWrapper.php, line 588
Class
- vfsStreamWrapper
- Stream wrapper to mock file system requests.
Namespace
org\bovigo\vfsCode
private function doPermChange($path, vfsStreamAbstractContent $content, \Closure $change) {
if (!$content->isOwnedByUser(vfsStream::getCurrentUser())) {
return false;
}
if (self::$root->getName() !== $path) {
$names = $this->splitPath($path);
$parent = $this->getContent($names['dirname']);
if (!$parent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
return false;
}
}
$change();
return true;
}