src/project/FileSyncManager.js
function reloadDoc(doc) {

        var promise = FileUtils.readAsText(doc.file);

        promise.done(function (text, readTimestamp) {
            doc.refreshText(text, readTimestamp);
        });
        promise.fail(function (error) {
            console.log("Error reloading contents of " + doc.file.fullPath, error);
        });
        return promise;
    }
function reloadDoc(doc) {

        var promise = FileUtils.readAsText(doc.file);

        promise.done(function (text, readTimestamp) {
            doc.refreshText(text, readTimestamp);
        });
        promise.fail(function (error) {
            console.log("Error reloading contents of " + doc.file.fullPath, error);
        });
        return promise;
    }
function reloadDoc ( doc ) { var promise = FileUtils . readAsText ( doc . file ) ; promise . done ( function ( text , readTimestamp ) { doc . refreshText ( text , readTimestamp ) ; } ) ; promise . fail ( function ( error ) { console . log ( "Error reloading contents of " + doc . file . fullPath , error ) ; } ) ; return promise ; }
Reloads the Document's contents from disk, discarding any unsaved changes in the editor.

@param {!Document} doc
@return {$.Promise} Resolved after editor has been refreshed; rejected if unable to load the
file's new content. Errors are logged but no UI is shown.
Reloads the Document s contents from disk discarding any unsaved changes in the editor .