Put content in configuration file
@param $filepath string File path
@param $content string new file content
@return int success
@throws
421736
public static function put(string $filepath, string $content):int
    {
        if (!file_exists($filepath)) {
            Server::create($filepath, "file");
        }
        file_put_contents($filepath, $content);
        self::open($filepath);
        return (1);
    }
342845
public function put($filename,$content,$type=''){
        $dir         =  dirname($filename);
        if(!is_dir($dir)){
            mkdir($dir,0777,true);
        }
        if(false === file_put_contents($filename,$content)){
            E(L('_STORAGE_WRITE_ERROR_').':'.$filename);
        }else{
            $this->contents[$filename]=$content;
            return true;
        }
    }
971968
public function append($filename,$content,$type=''){
        if($old_content = $this->read($filename,$type)){
            $content =  $old_content.$content;
        }
        return $this->put($filename,$content,$type);
    }
472544
public function createFileOnDFS( $filePath, $contents )
    {
        $this->accumulatorStart();

        $filePath = $this->makeDFSPath( $filePath );
        $ret = $this->createFile( $filePath, $contents, false );

        $this->accumulatorStop();

        return $ret;
    }
316279
protected function saveFile($filename, $content)
	{
		$filename = $this->dir . $filename; 
		$f = fopen($filename, "wb");
		if($f)
		{
			if(fwrite($f, $this->processForFile($content)))
			{
				fclose($f);
				chmod($filename, 0600);
				return true;
			}
			fclose($f);
		}
		return false;
	}
797325
private function write($src, $fileName, $content)
    {

        if (!$this->file->exists($src)) {
            $this->file->makeDirectory($src);
        }
        $this->file->put($fileName, $content);
    }
631821
protected function write($content): bool
    {
        if ($content === false || $content === null) {
            return false;
        }

        return \is_resource($content)
            ? $this->filesystem->putStream($this->path, $content)
            : $this->filesystem->put($this->path, $content);
    }
505293
public static function createFile($file, $content = '')
    {
        $folder = dirname($file);
        if (!is_dir($folder)) {
            self::createFolder($folder);
        }

        file_put_contents($file, $content);
    }
927095
public static function saveFile(string $fullPath, string $content)
    {
        if (file_exists($fullPath)) {
            $arrFilePath = explode(DIRECTORY_SEPARATOR, $fullPath);
            $fileName = array_pop($arrFilePath);
            $newFileName = self::iterateFileName($fileName);
            $arrFilePath[] = $newFileName;
            $newFullPath = implode(DIRECTORY_SEPARATOR, $arrFilePath);
            return self::saveFile($newFullPath, $content);
        }
        $file = fopen($fullPath, "w");
        fputs($file, $content);
        fclose($file);
        chmod($fullPath, 0775);
        return $fullPath;
    }
207716
public function putContent($content)
    {
        // write to io stream
        $this->size = fwrite($this->inputStream, $content);
        // rewind file pointer
        rewind($this->inputStream);
    }
652469
public function setContent(string $content): void {
		
		// there's two options here:  that the concatenation of $this->root_path
		// and $content is a file and we pass that to our view or that it isn't
		// and we pass the $content argument to the view directly assuming that
		// it's a string of content.
		
		$temp = $this->root_path . DIRECTORY_SEPARATOR . $content;
		$this->view->setContent(is_file($temp) ? $temp : $content);
	}
81123
public static function appendContents($filename, $contents)
    {
        $result = file_put_contents($filename, $contents, \LOCK_EX | \LOCK_NB | \FILE_APPEND);
        if ($result === false) {
            throw new \RuntimeException("Cannot append to the file: " . $filename);
        }
    }
1071881
protected function saveInFile($content)
    {
        $filename = $this->config->get('file_directory').DIRECTORY_SEPARATOR.$this->config->get('file_name');
        $fp = fopen($filename,"a+b");
        //TODO: Cifrar contido
        fwrite($fp,$content.";");
        fclose($fp);
    }
409521
public function filePutsContent($path, $content)
    {
        if (@file_put_contents($path, $content) === false) {
            throw new \RuntimeException(sprintf("Could't puts content %s", $path));
        }

        chmod($path, 0777);
    }
118239
public function append($filename, $content)
    {
        if ($this->exists($filename) && $this->isFile($filename)) {
            return file_put_contents($filename, $content, FILE_APPEND);
        }

        throw new FileNotFoundException('File not found in the path [ ' . $filename . ' ].');
    }
1161144
public static function append( $path, $content ) 
	{
		if ( !is_dir( dirname( $path ) ) ) 
		{
			if ( !mkdir( dirname( $path ), 0755, true ) ) 
			{
				throw new CCException( "CCFile - could not create directory: ".dirname( $path ) );
			}
		}
		return file_put_contents( $path, $content, LOCK_EX | FILE_APPEND );
	}
1298686
public function put(string $path, string $contents) : int
    {
        return file_put_contents($path, $contents, LOCK_EX);
    }