public __construct ( string $name, integer $permissions = null ) | ||
$name | string | |
$permissions | integer | optional |
public function __construct($name, $permissions = null)
{
$this->name = "{$name}";
$time = time();
if (null === $permissions) {
$permissions = $this->getDefaultPermissions() & ~vfsStream::umask();
}
$this->lastAccessed = $time;
$this->lastAttributeModified = $time;
$this->lastModified = $time;
$this->permissions = $permissions;
$this->user = vfsStream::getCurrentUser();
$this->group = vfsStream::getCurrentGroup();
}
/** * constructor * * @param string $name * @param int $permissions optional */ public function __construct($name, $permissions = null) { $this->content = new StringBasedFileContent(null); $this->type = vfsStreamContent::TYPE_FILE; parent::__construct($name, $permissions); }