public static function file_put_contents(string $filename, $data, int $flags = 0, $context = null){
		$dir = dirname($filename);
		if(!is_dir($dir)){
			if(!mkdir($dir, 0777, true)){
				throw new Exception("Could not create directory $dir");
			}
		}

		file_put_contents($filename, $data, $flags, $context);
	}