writeFile(filename, data, create = false, exclusive = true) {
		exclusive = create ? exclusive : false;
		const name = filename.split("/").pop();
		const dirname = Url.dirname(filename);

		return new Promise((resolve, reject) => {
			reject = setMessage(reject);
			window.resolveLocalFileSystemURL(
				dirname,
				(entry) => {
					entry.getFile(
						name,
						{ create, exclusive },
						(fileEntry) => {
							fileEntry.createWriter((file) => {
								file.onwriteend = (res) => resolve(filename);
								file.onerror = (err) => reject(err.target.error);
								file.write(data);
							});
						},
						reject,
					);
				},
				reject,
			);
		});
	}
@param {string} filename
@param {any} data
@param {boolean} create If this property is true, and the requested file or
directory doesn't exist, the user agent should create it.
The default is false. The parent directory must already exist.
@param {boolean} exclusive If true, and the create option is also true,
the file must not exist prior to issuing the call.
Instead, it must be possible for it to be created newly at call time. The default is true.
@returns {Promise}