public function perms($value = false)
    {
        if ($value === false) {
            return substr(sprintf('%o', $this->adapter->fileperms($this->path)), -4);
        }

        if (! $this->adapter->chmod($this->path, $value)) {
            throw new FilesystemException("Unable to apply permissions to '{$this->path}'");
        }

        $this->clearStat();

        return $this;
    }