Filesystem.php
public static function write(string $path, string $contents, string $visibility = 'public', int $flags = LOCK_EX)
    {
        if (file_put_contents($path, $contents, $flags) === false) {
            return false;
        }

        Filesystem::setVisibility($path, $visibility);

        return true;
    }
public static function write(string $path, string $contents, string $visibility = 'public', int $flags = LOCK_EX)
    {
        if (file_put_contents($path, $contents, $flags) === false) {
            return false;
        }

        Filesystem::setVisibility($path, $visibility);

        return true;
    }
public static function write ( string $ path , string $ contents , string $ visibility = 'public' , int $ flags = LOCK_EX ) { if ( file_put_contents ( $ path , $ contents , $ flags ) === false ) { return false ; } Filesystem :: setVisibility ( $ path , $ visibility ) ; return true ; }
Write a file.

@param string  $path           The path of the new file.
@param string  $contents       The file contents.
@param string  $visibility     An optional configuration array.
@param int     $flags          Flags
@return bool True on success, false on failure.
Write a file .