src/Service/Misc/File.php
public function putFileContents($filePath, $string)
    {
        if ($this->fileIsReadable($filePath) === true) {
            // Existing file. Most likely a html log file.
            file_put_contents($filePath, $string, FILE_APPEND);
            return;
        }

        // New file. We tell the caching, that we have read access here.
        file_put_contents($filePath, $string, FILE_APPEND);
        static::$isReadableCache[$filePath] = true;
    }
public function putFileContents($filePath, $string)
    {
        if ($this->fileIsReadable($filePath) === true) {
            // Existing file. Most likely a html log file.
            file_put_contents($filePath, $string, FILE_APPEND);
            return;
        }

        // New file. We tell the caching, that we have read access here.
        file_put_contents($filePath, $string, FILE_APPEND);
        static::$isReadableCache[$filePath] = true;
    }
public function putFileContents ( $ filePath , $ string ) { if ( $ this -> fileIsReadable ( $ filePath ) === true ) { // Existing file. Most likely a html log file. file_put_contents ( $ filePath , $ string , FILE_APPEND ) ; return ; } // New file. We tell the caching, that we have read access here. file_put_contents ( $ filePath , $ string , FILE_APPEND ) ; static :: $ isReadableCache [ $ filePath ] = true ; }
Write the content of a string to a file.

When the file already exists, we will append the content.
Caches weather we are allowed to write, to reduce the overhead.

@param string $filePath
Path and filename.
@param string $string
The string we want to write.
Write the content of a string to a file .