Write the configuration data

@param string		$file
@return void
160851
public function write( $file, $data )
	{
		// check for absolut path
		if ( substr( $file, 0, 1 ) == '/' ) 
		{
			return $this->write_file( $file, $data );
		}
		
		$this->write_file( $this->path( $file ), $data );
	}
656701
public function write(File $file)
    {
        $filename = $file->getFilename();
        if (null === $filename) {
            throw new NoFilenameGivenException();
        }
        $content = $this->contentFactory->make($file);

        try {
            $this->symfonyFilesystem->dumpFile($filename, $content, null);
        } catch (SymfonyIOException $e) {
            $message = sprintf('Failed to write "%s".', $filename);

            throw new IOException($filename, $message, $e);
        }
    }
869681
public function fileAppend($file, $data)
    {
        $file = $this->alias->resolve($file);
        $this->_dirCreate(dirname($file));

        if (file_put_contents($file, $data, LOCK_EX | FILE_APPEND) === false) {
            throw new RuntimeException(['write `:file` file failed: :last_error_message', 'file' => $file]);
        }
    }
349914
private function _write($file, $data, $config)
    {
        $result = file_put_contents($file, $data);
        if ($result !== false) {
            // set permissions of the new file (no execute)
            $chmod = $config->get('Cache.SerializerPermissions');
            if ($chmod !== null) {
                chmod($file, $chmod & 0666);
            }
        }
        return $result;
    }
144755
public function save($file)
	{
		$handle = strcasecmp(substr($file, -3), '.gz') ? fopen($file, 'wb') : gzopen($file, 'wb');
		if (!$handle) {
			throw new Exception("ERROR: Cannot write file '$file'.");
		}
		$this->write($handle);
	}
256195
public function loadConfigurationFile($file = null)
    {
        $file = $file ?: $this->findConfigurationFile();
        if (! file_exists($file))
            return;

        $this->config = $this->yaml->load($file);
    }
94238
public function load($file)
    {
        $loader = new PhpConfig();
        $widgets = $loader->read($file);
        $this->add($widgets);
    }
1146263
public function write($content) : void
    {
        $this->checkFile();
        $this->checkDir();

        file_put_contents($this->path, $content);
    }
247818
public function overrideConfig($file)
    {
        if (!$this->init) {
            $config = Yaml::parse($file);
            $this->config = array_merge_recursive_ex($this->config, $config);
        } else {
            throw new \Exception('Trying to override configuration after init()');
        }
    }
712899
public function init($file, array $data = null)
    {
        if ($data === null) {
            $data = $this->setJsonDefaults([]);
        }
        $this->app['filesystem']->write($file, Json::dump($data, Json::HUMAN));
    }
517499
public function set(string $key, $value): void
	{
		[$file] = $this->parseKey($key);

		if(!isset($this->configuration[$file]))
		{
			$this->load($file);
		}

		Arr::set($this->configuration, $key, $value);
	}
676607
public function write( $value ): void {
		if ( $value !== $this->value ) {
			$this->emit( GPIO::BEFORE_VALUE_CHANGE_EVENT, [ $this ] );
			$value = boolval( $value ) ? 1 : 0;
			fwrite( $this->fileHandler, "$value", 1 );
			$this->value = $value;
			$this->emit( GPIO::AFTER_VALUE_CHANGE_EVENT, [ $this ] );
		}
	}
594845
public function write(array $data): void
    {
        $this->doWrite($data, $this->file, $this->sheet, $this->range);
    }
529440
private function write($content)
    {
        $handle = fopen($this->_config, 'w+');
        fwrite($handle, @json_encode($content));
        fclose($handle);
    }
476035
public static function set(string $key, string $value): void
    {
        /* Check if initialized */
        if (!self::$initialized) {
            self::initialize();
        }

        /* Check if key exists */
        if (!self::$configs[$key]) {
            return;
        }

        /* Check if values are the same */
        if (self::$configs[$key] == $value) {
            return;
        }

        /* Write to current array */
        self::$configs[$key] = $value;

        /* Write to file */
        file_put_contents(self::$path, self::convertConfigsToFile());
    }
1221324
public function write($path = '', $file = '', $content = '')
  {
    $the_path = Application::config()->public_folder() . '/' . $path;

    @mkdir($the_path, 0755, true);
    $this->write_to($the_path . '/'. $file, $content);
  }
417827
public function dump($file, $contents)
    {
        $filesystem = new Filesystem();
        $filesystem->dumpFile($file, $contents);
        $filesystem->chmod($file, 0644);
    }