/** * constructor * * @param string $name * @param int $permissions optional * @throws vfsStreamException */ public function __construct($name, $permissions = null) { if (strstr($name, '/') !== false) { throw new vfsStreamException('Directory name can not contain /.'); } $this->type = vfsStreamContent::TYPE_DIR; parent::__construct($name, $permissions); }
/** * constructor * * @param string $name * @param int $permissions optional */ public function __construct($name, $permissions = null) { $this->type = vfsStreamContent::TYPE_FILE; parent::__construct($name, $permissions); }