src/Path.php
public static function setPermissions($path, $mode=0777, $recursive=true)
  {
    $path = Path::clean($path);
    
    $fs = new Filesystem();
    
    try {
      $fs->chmod($path, $mode, 0000, $recursive);
    } catch(IOExceptionInterface $e){
      return false;
    }
    
    return true;
  }
public static function setPermissions($path, $mode=0777, $recursive=true)
  {
    $path = Path::clean($path);
    
    $fs = new Filesystem();
    
    try {
      $fs->chmod($path, $mode, 0000, $recursive);
    } catch(IOExceptionInterface $e){
      return false;
    }
    
    return true;
  }
public static function setPermissions ( $ path , $ mode = 0777 , $ recursive = true ) { $ path = Path :: clean ( $ path ) ; $ fs = new Filesystem ( ) ; try { $ fs -> chmod ( $ path , $ mode , 0000 , $ recursive ) ; } catch ( IOExceptionInterface $ e ) { return false ; } return true ; }
Chmods files and directories recursively to given permissions.

@param   string  $path   Root path to begin changing mode [without trailing slash].
@param   string  $mode   Octal representation of the value to change mode.
@return   boolean  True if successful
Chmods files and directories recursively to given permissions .