function processFiles(data, mode = "search") {
	const process = mode === "search" ? searchInFile : replaceInFile;
	const { files, search, replace, options } = data;
	const { test: skip } = Skip(options);
	const total = files.length;
	let count = 0;

	files.forEach(processFile);

	/**
	 * Process a file for search or replace operation.
	 *
	 * @param {object} file - The file object to process.
	 * @param {string} file.url - The URL of the file.
	 */
	function processFile(file) {
		if (skip(file)) {
			done(++count / total, mode);
			return;
		}

		getFile(file.url, (res, err) => {
			if (err) {
				done(++count / total, mode);
				throw err;
			}

			process({ file, content: res, search, replace, options });
			done(++count / total, mode);
		});
	}
}
Process files for search or replace operations.

@param {object} data - The data containing files, search, replace, and options.
@param {'search' | 'replace'} [mode='search'] - The mode of operation (search or replace).