function _saveFileList(fileList) {
        // Do in serial because doSave shows error UI for each file, and we don't want to stack
        // multiple dialogs on top of each other
        var userCanceled = false,
            filesAfterSave = [];

        return Async.doSequentially(
            fileList,
            function (file) {
                // Abort remaining saves if user canceled any Save As dialog
                if (userCanceled) {
                    return (new $.Deferred()).reject().promise();
                }

                var doc = DocumentManager.getOpenDocumentForPath(file.fullPath);
                if (doc) {
                    var savePromise = handleFileSave({doc: doc});
                    savePromise
                        .done(function (newFile) {
                            filesAfterSave.push(newFile);
                        })
                        .fail(function (error) {
                            if (error === USER_CANCELED) {
                                userCanceled = true;
                            }
                        });
                    return savePromise;
                } else {
                    // workingset entry that was never actually opened - ignore
                    filesAfterSave.push(file);
                    return (new $.Deferred()).resolve().promise();
                }
            },
            false  // if any save fails, continue trying to save other files anyway; then reject at end
        ).then(function () {
            return filesAfterSave;
        });
    }
Saves all unsaved documents corresponding to 'fileList'. Returns a Promise that will be resolved
once ALL the save operations have been completed. If ANY save operation fails, an error dialog is
immediately shown but after dismissing we continue saving the other files; after all files have
been processed, the Promise is rejected if any ONE save operation failed (the error given is the
first one encountered). If the user cancels any Save As dialog (for untitled files), the
Promise is immediately rejected.

@param {!Array.<File>} fileList
@return {!$.Promise} Resolved with {!Array.<File>}, which may differ from 'fileList'
     if any of the files were Unsaved documents. Or rejected with {?FileSystemError}.