public static function Create( string $file, $mode = 0750, bool $overwrite = true, $contents = '' )
   {

      $f = File::CreateNew( $file, $overwrite, true, true, $mode );
      $f->write( $contents );
      $f->close();

   }
public static function Create( string $file, $mode = 0750, bool $overwrite = true, $contents = '' )
   {

      $f = File::CreateNew( $file, $overwrite, true, true, $mode );
      $f->write( $contents );
      $f->close();

   }
public static function Create ( string $ file , $ mode = 0750 , bool $ overwrite = true , $ contents = '' ) { $ f = File :: CreateNew ( $ file , $ overwrite , true , true , $ mode ) ; $ f -> write ( $ contents ) ; $ f -> close ( ) ; }
Creates a new file with the defined content.

If $overwrite is FALSE and the file already exists, a {@see \Beluga\IO\FileAlreadyExistsException} is thrown.

@param  string       $file                The path of the file to create.
@param  integer      $mode                The file access mode (only used by unixoids) (default=0750)
@param  boolean      $overwrite           Overwrite the file if it exists? (default=TRUE)
@param  string|array $contents            The contents of the file (string or lines array) (default='')
@throws FileAlreadyExistsError If file exists and overwriting is disabled.
@throws FileAccessError        On errors while opening the file pointer
Creates a new file with the defined content .