function getNextPrevFile(inc) {
        if (inc !== -1 && inc !== +1) {
            throw new Error("Illegal argument: inc = " + inc);
        }
        
        if (_currentDocument) {
            var mruI = findInWorkingSet(_currentDocument.file.fullPath, _workingSetMRUOrder);
            if (mruI === -1) {
                // If doc not in working set, return most recent working set item
                if (_workingSetMRUOrder.length > 0) {
                    return _workingSetMRUOrder[0];
                }
            } else {
                // If doc is in working set, return next/prev item with wrap-around
                var newI = mruI + inc;
                if (newI >= _workingSetMRUOrder.length) {
                    newI = 0;
                } else if (newI < 0) {
                    newI = _workingSetMRUOrder.length - 1;
                }
                
                return _workingSetMRUOrder[newI];
            }
        }
        
        // If no doc open or working set empty, there is no "next" file
        return null;
    }
Get the next or previous file in the working set, in MRU order (relative to currentDocument).
@param {Number} inc  -1 for previous, +1 for next; no other values allowed
@return {?FileEntry}  null if working set empty