function vfsStreamWrapper::unlink
remove the data under the given path
Parameters
string $path:
Return value
bool
File
-
vendor/
mikey179/ vfsstream/ src/ main/ php/ org/ bovigo/ vfs/ vfsStreamWrapper.php, line 743
Class
- vfsStreamWrapper
- Stream wrapper to mock file system requests.
Namespace
org\bovigo\vfsCode
public function unlink($path) {
$realPath = $this->resolvePath(vfsStream::path($path));
$content = $this->getContent($realPath);
if (null === $content) {
trigger_error('unlink(' . $path . '): No such file or directory', E_USER_WARNING);
return false;
}
if ($content->getType() !== vfsStreamContent::TYPE_FILE) {
trigger_error('unlink(' . $path . '): Operation not permitted', E_USER_WARNING);
return false;
}
return $this->doUnlink($realPath);
}