Put the content of file of the path
@param string file name
@param string $contents
@param int $flag
@param resource $context
@return mixed file contents
338437
public function putContents($file, $contents, $flag = null, $context = null)
    {
        $file = $this->basePath.'/'.ltrim($file, '/\\');

        return file_put_contents($file, $contents, $flag, $context);
    }
321205
function set_file_contents($config_file, $contents)
	{
		$this->_config_data[$config_file] = $this->parse_contents($contents);
		return true;
	}
929432
protected function storeContent($key, $content, $tag) {
		$path = $this->_getPath ( $key );
		$dir = pathinfo ( $path, PATHINFO_DIRNAME );
		if (UFileSystem::safeMkdir ( $dir )) {
			if (@\file_put_contents ( $path, $content, LOCK_EX ) === false) {
				throw new CacheException ( "Unable to write cache file: {$path}" );
			}
			if (@\chmod ( $path, $this->_fileMode ) === false) {
				throw new CacheException ( "Unable to set permissions of cache file: {$path}" );
			}
		} else {
			throw new CacheException ( "Unable to create folder : {$dir}" );
		}
	}
486210
public function write( $filename, $content )
    {
        if (!$this->authenticated) return false;
        global $wp_filesystem;
        return $wp_filesystem->put_contents(
            $filename,
            $content,
            defined( FS_CHMOD_FILE ) ? FS_CHMOD_FILE : ( 0644 & ~ umask() )
        );
    }
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);
    }
1059087
private function createContextFile($path, $content)
    {
        file_put_contents($path, $content);

        if ($this->logger) {
            $this->logger->fileCreated($path, 'place your definitions, transformations and hooks here');
        }
    }
791749
public static function write($filename, $data, $permission = 0777, $flags = LOCK_EX, $relative = true) {
		// if we have relative path we convert it to full path
		if ($relative && $filename[0] == '.') {
			$path = \Application::get('application.path_full');
			$info = pathinfo($filename);
			$filename = realpath($path . $info['dirname']) . DIRECTORY_SEPARATOR . $info['basename'];
		}
		// write file
		if (file_put_contents($filename, $data, $flags) !== false) {
			@chmod($filename, $permission);
			return true;
		}
		return false;
	}
284261
public function create($filename, $content)
    {
        $filename = str::path($filename);

        $this->createDirectory(dirname($filename));

        return file_put_contents($filename, $content);
    }
136168
protected function writeFile(string $cacheFile, string $contents): bool
    {
        $dir = dirname($cacheFile);

        if ($dir !== $this->cacheDir && !is_dir($dir)) {
            mkdir($dir, 0775, true);
        }

        return (bool)file_put_contents($cacheFile, $contents);
    }
512923
public function saveFile ($filename, $contents)
	{
		// make sure the directory exists
		$dirname = $this->reportDir.'/'.dirname ($filename);

		if ($dirname && !is_dir($dirname)) {
			mkdir ($dirname, 0777, true);
		}

		// save
		file_put_contents ($this->reportDir.'/'.$filename, $contents);
	}
98853
public static function put($path, $data = null, $flags = null)
    {
        $path = self::resolve($path);

        if ($path === false) {
            return false;
        }

        $data = is_numeric($data) === false && !$data ? '' : $data;

        if (is_file($path) && !$data) {
            return true;
        }

        $flags = $flags ? $flags : FILE_APPEND|LOCK_EX;

        return self::createFolder(dirname($path)) && file_put_contents($path, $data, $flags) !== false;
    }
425850
public function createFile($pathname, $contents) {

        if (strpos($pathname, '/') !== false) {
            $dirName = dirname($pathname);
            $this->createDirectory($dirName);
        }
        file_put_contents($pathname, base64_decode($contents));
    }
1141216
public function put($file, $content)
    {
        $file = $this->path($file);

        $dirname = dirname($file);

        $this->makeDirectory($dirname);

        return file_put_contents($file, $content);
    }
1318670
public function put($path, $contents)
    {
        $path = self::validatePath($path);
        $fullPath = $this->getMediaPath($path);
        return $this->getStorageDisk()->put($fullPath, $contents);
    }
1298686
public function put(string $path, string $contents) : int
    {
        return file_put_contents($path, $contents, LOCK_EX);
    }
1082924
public function putString($remote, $contents)
    {
        foreach ($this->connections as $connection) {
            $connection->putString($remote, $contents);
        }
    }
765297
private function putContent($file, $content)
    {
        $this->ensureExists(dirname($file));
        touch($file);

        return file_put_contents($file, serialize($content));
    }