src/File.php
public static function write($filename, $buffer)
  {
    $fs = new Filesystem();
    
    try {
      $fs->dumpFile($filename, $buffer);
    }
    catch(IOExceptionInterface $e){
      throw new Exception($e->getMessage());
    }
    
    return true;
  }
public static function write($filename, $buffer)
  {
    $fs = new Filesystem();
    
    try {
      $fs->dumpFile($filename, $buffer);
    }
    catch(IOExceptionInterface $e){
      throw new Exception($e->getMessage());
    }
    
    return true;
  }
public static function write ( $ filename , $ buffer ) { $ fs = new Filesystem ( ) ; try { $ fs -> dumpFile ( $ filename , $ buffer ) ; } catch ( IOExceptionInterface $ e ) { throw new Exception ( $ e -> getMessage ( ) ) ; } return true ; }
Write contents to a file

@param   string    $filename    The full file path
@param   string    $buffer      The buffer to write
@return   boolean   True on success
@throws   Exception
Write contents to a file