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;
    }
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;
    }
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 ; }
Gets or Sets the file permissions.

@param  int $value
@return string|Tarsana\Filesystem\AbstractFile

@throws Tarsana\Filesystem\Exceptions\FilesystemException if could not apply permissions to file.
Gets or Sets the file permissions .