protected function cacheFile($path, $cachefsPath)
    {
        if (array_key_exists($path, $this->cachedFiles)) {
            return;
        }

        if (file_exists($path)) {
            $contents = file_get_contents($path);
            file_put_contents($cachefsPath, $contents);

            $this->cachedFiles[$path] = $cachefsPath;
        }
    }
protected function cacheFile($path, $cachefsPath)
    {
        if (array_key_exists($path, $this->cachedFiles)) {
            return;
        }

        if (file_exists($path)) {
            $contents = file_get_contents($path);
            file_put_contents($cachefsPath, $contents);

            $this->cachedFiles[$path] = $cachefsPath;
        }
    }
protected function cacheFile ( $ path , $ cachefsPath ) { if ( array_key_exists ( $ path , $ this -> cachedFiles ) ) { return ; } if ( file_exists ( $ path ) ) { $ contents = file_get_contents ( $ path ) ; file_put_contents ( $ cachefsPath , $ contents ) ; $ this -> cachedFiles [ $ path ] = $ cachefsPath ; } }
Adds the requested file to cache.

@param string $path path to the file to be cached.
@param string $cachefsPath path for the cached file(under 'cachefs://').
Adds the requested file to cache .