original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Gets or Sets the file permissions .