function linearizeFiles(files) {
	function reduceToLinearFiles(_files) {
		return _files.reduce((list, currentFile) => {
			if (currentFile.isFolder) {
				return [...list, ...reduceToLinearFiles(currentFile.children)];
			}
			return [...list, currentFile];
		}, []);
	}
	return reduceToLinearFiles(files);
}
Returns a linear file list from a nested file strcuture.
It excludes the folders from the returned list.
@param {array} files Nested file structure