Store the contents of a file manually.

@param string $config_file file name of the related contents
@param string $contents the file-contents to parse
321205
function set_file_contents($config_file, $contents)
	{
		$this->_config_data[$config_file] = $this->parse_contents($contents);
		return true;
	}
166750
public function write($path, $contents, Config $config, $isPutFile = false)
    {
        $auth = $this->getAuth();
        $token = $auth->uploadToken($this->bucket, $path);
        $params = $config->get('params', null);
        $mime = $config->get('mime', 'application/octet-stream');
        $checkCrc = $config->get('checkCrc', false);

        $upload_manager = $this->getUploadManager();

        if ($isPutFile) {
        	list($ret, $error) = $upload_manager->putFile($token, $path, $contents, $params, $mime, $checkCrc);
        } else {
        	list($ret, $error) = $upload_manager->put($token, $path, $contents, $params, $mime, $checkCrc);
        }

        if ($error !== null) {
            $this->logQiniuError($error);

            return false;
        } else {
            return $ret;
        }
    }
636071
public function write($path, $contents, array $config = [])
    {
        return $this->fileSystem->write($path, $contents, $config);
    }
844824
public function write($path, $contents, Config $config)
    {
        $temporaryPath = $this->createTemporaryFile($contents);

        $response = $this->cosApi->upload($this->getBucket(), $temporaryPath, $path,
            null, null, $config->get('insertOnly', 1));

        $response = $this->normalizeResponse($response);

        if (false !== $response) {
            $this->setContentType($path, $contents);
        }

        return $response;
    }
518531
public function write($path, $contents, Config $config) {
        try {
            $mapping = $this->mapper->get($path);

            $file = null;

            if ($mapping) {
                $volume = $this->client->lookup($mapping['fid']);

                $file = new \stdClass();
                $file->url = $volume->url;
                $file->fid = $mapping['fid'];
            }

            $file = $this->client->upload($contents, basename($path), $file);

            if (!$file) {
                return false;
            }

            $this->mapper->store($path, $file->fid, mimetype_from_filename($path), $file->size);

            return $file->toArray();
        } catch (SeaweedFSException $e) {
            return false;
        }
    }
1333899
public function setContents($file_path, $file_contents)
    {
        if (isset($this->open_files[strtolower($file_path)])) {
            $this->open_files[strtolower($file_path)] = $file_contents;
        }

        if (isset($this->temp_files[strtolower($file_path)])) {
            $this->temp_files[strtolower($file_path)] = $file_contents;
        }

        file_put_contents($file_path, $file_contents);
    }
667976
public function write($path, $contents, Config $config)
    {
        $this->recursiveCreateDir(Util::dirname($path));

        $location = $this->applyPathPrefix($path);
        $stream = $this->share->write($location);

        fwrite($stream, $contents);

        if (!fclose($stream)) {
            return false;
        }

        return compact('path', 'contents');
    }
1340823
public function parseFile($filename, $config = NULL, $encoding = NULL, $use_include_path = false, $filename, $config = NULL, $encoding = NULL, $use_include_path = false)
    {
    }
1114221
private static function includeConfigFile(array &$config, $config_file, File $base_dir, ConfigReader $reader)
    {
        // try relative path
        $file = new File($config_file, $base_dir);
        
        if ( $file->exists() ){
            $included = self::loadConfigFileByFormat( $file, $reader );
            $config = array_merge_recursive($config, $included);
            return;
        }
        
        // try full path
        $file = new File($config_file);
        
        if ( $file->exists() ){
            $included = self::loadConfigFileByFormat( $file, $reader );
            $config = array_merge_recursive($config, $included);
            return;
        }
        
        throw new IncludeConfigFileNotFoundException($config_file);
    }
391649
public function write( $key, $contents ) {
		$filename = $this->prepare_write( $key );

		if ( $filename ) {
			return file_put_contents( $filename, $contents ) && touch( $filename );
		}

		return false;
	}
1143288
public function write($path, $contents, Config $config)
    {
        return $this->update($path, $contents, $config);
    }
1104963
public function write($path, $contents, Config $config)
    {

        // 1. Save to temporary local file -- it will be destroyed automatically
        $tempfile = tmpfile();
        fwrite($tempfile, $contents);

        // 2. Use Cloudinary to send
        $uploaded_metadata = $this->writeStream($path, $tempfile, $config);

        return $uploaded_metadata;
    }
1346924
function load_file($file_name, $prepend_path = true)
	{
		if ($prepend_path && $this->_config_path != "")
		$config_file = $this->_config_path . $file_name;
		else
		$config_file = $file_name;

		ini_set('track_errors', true);
		$fp = @fopen($config_file, "r");
		if (!is_resource($fp)) {
			$this->_trigger_error_msg("Could not open config file '$config_file'");
			return false;
		}

		$contents = ($size = filesize($config_file)) ? fread($fp, $size) : '';
		fclose($fp);

		$this->_config_data[$config_file] = $this->parse_contents($contents);
		return true;
	}
913707
public function update(string $path, string $contents, array $config = []): bool
    {
        $path = $this->normalizePath($path);
        $this->assertPresent($path);
        $config = $this->prepareConfig($config);

        return $this->getAdapter()->update($path, $contents, $config);
    }
338437
public function putContents($file, $contents, $flag = null, $context = null)
    {
        $file = $this->basePath.'/'.ltrim($file, '/\\');

        return file_put_contents($file, $contents, $flag, $context);
    }
1201926
private function storeContents($path, $content = "")
    {
        GeneratorHelper::createDir(dirname($path));
        if ("" !== $content && false === file_put_contents($path, $content)) {
            throw new ConfigException(t('No se tienen permisos para escribir en ' . $path));
        }
    }
269738
public function input($file_content)
    {
        $this->file_content = $file_content;

        $this->parsed_content = json_decode($this->file_content, true);
    }