Function Commandr_fs->write_file

Definitions

sources/commandr_fs.php

  • Write to a file; create the file if it doesn't exist.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$to_write array No No required parameter N/A N/A The file to write
$contents string No No required parameter N/A N/A The contents to write

Returns

  • Success?
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Write to a file; create the file if it doesn't exist.
 *
 * @param  array $to_write The file to write
 * @param  string $contents The contents to write
 * @return boolean Success?
 */

public function write_file(array $to_write, string $contents) : bool