src/extensibility/Package.js
function disable(path) {
        var result = new $.Deferred(),
            file = FileSystem.getFileForPath(path + "/.disabled");

        var defaultExtensionPath = ExtensionLoader.getDefaultExtensionPath();
        if (file.fullPath.indexOf(defaultExtensionPath) === 0) {
            toggleDefaultExtension(path, false);
            result.resolve();
            return result.promise();
        }

        file.write("", function (err) {
            if (err) {
                return result.reject(err);
            }
            result.resolve();
        });
        return result.promise();
    }
function disable(path) {
        var result = new $.Deferred(),
            file = FileSystem.getFileForPath(path + "/.disabled");

        var defaultExtensionPath = ExtensionLoader.getDefaultExtensionPath();
        if (file.fullPath.indexOf(defaultExtensionPath) === 0) {
            toggleDefaultExtension(path, false);
            result.resolve();
            return result.promise();
        }

        file.write("", function (err) {
            if (err) {
                return result.reject(err);
            }
            result.resolve();
        });
        return result.promise();
    }
function disable ( path ) { var result = new $ . Deferred ( ) , file = FileSystem . getFileForPath ( path + "/.disabled" ) ; var defaultExtensionPath = ExtensionLoader . getDefaultExtensionPath ( ) ; if ( file . fullPath . indexOf ( defaultExtensionPath ) === 0 ) { toggleDefaultExtension ( path , false ) ; result . resolve ( ) ; return result . promise ( ) ; } file . write ( "" , function ( err ) { if ( err ) { return result . reject ( err ) ; } result . resolve ( ) ; } ) ; return result . promise ( ) ; }
Disables the extension at the given path.

@param {string} path The absolute path to the extension to disable.
@return {$.Promise} A promise that's resolved when the extenion is disabled, or
rejected if there was an error.
Disables the extension at the given path .