def readdir(self, path, fh):
        (typ,kw) = path_type(path)
        if typ=='root':
            return ['.', '..', 'histories']
        elif typ=='histories':
            hl = self._histories()
            # Count duplicates
            hist_count = {}
            for h in hl:
                try:
                    hist_count[h['name']] += 1
                except:
                    hist_count[h['name']] = 1
            # Build up results manually
            results = ['.', '..']
            for h in hl:
                if h['name'] in hist_count and hist_count[h['name']] > 1:
                    results.append(esc_filename(h['name'] + '-' + h['id']))
                else:
                    results.append(esc_filename(h['name']))
            return results
        elif typ=='datasets':
            h = self._history(kw['h_name'])
            ds = self._datasets(h)
            #print ds
            # Count duplicates
            d_count = {}
            for d in ds:
                try:
                    d_count[d['name']] += 1
                except:
                    d_count[d['name']] = 1
            results = ['.', '..']
            for d in ds:
                if d['name'] in d_count and d_count[d['name']] > 1:
                    results.append(esc_filename(d['name'] + '-' + d['id']))
                else:
                    results.append(esc_filename(d['name']))
            return results

    # Disable unused operations:
dataset/ETHPy150Open gvlproject/gvl_commandline_utilities/roles/gvl.commandline-utilities/files/galaxy-fuse.py/Context.readdir/original