application/Espo/Core/Utils/File/Manager.php
public function putContents($path, $data, $flags = 0)
    {
        $fullPath = $this->concatPaths($path); //todo remove after changing the params

        if ($this->checkCreateFile($fullPath) === false) {
            throw new Error('Permission denied for '. $fullPath);
        }

        $res = (file_put_contents($fullPath, $data, $flags) !== FALSE);
        if ($res && function_exists('opcache_invalidate')) {
            @opcache_invalidate($fullPath);
        }

        return $res;
    }
public function putContents($path, $data, $flags = 0)
    {
        $fullPath = $this->concatPaths($path); //todo remove after changing the params

        if ($this->checkCreateFile($fullPath) === false) {
            throw new Error('Permission denied for '. $fullPath);
        }

        $res = (file_put_contents($fullPath, $data, $flags) !== FALSE);
        if ($res && function_exists('opcache_invalidate')) {
            @opcache_invalidate($fullPath);
        }

        return $res;
    }
public function putContents ( $ path , $ data , $ flags = 0 ) { $ fullPath = $ this -> concatPaths ( $ path ) ; //todo remove after changing the params if ( $ this -> checkCreateFile ( $ fullPath ) === false ) { throw new Error ( 'Permission denied for ' . $ fullPath ) ; } $ res = ( file_put_contents ( $ fullPath , $ data , $ flags ) !== FALSE ) ; if ( $ res && function_exists ( 'opcache_invalidate' ) ) { @ opcache_invalidate ( $ fullPath ) ; } return $ res ; }
Write data to a file

@param  string | array  $path
@param  mixed  $data
@param  integer $flags

@return bool
Write data to a file