'Clean up on-disk files that are obsolete and gather the set of valid
on-disk files for an object.
:param hsh_path: object hash path
:param frag_index: if set, search for a specific fragment index .data
file, otherwise accept the first valid .data file
:returns: a dict that may contain: valid on disk files keyed by their
filename extension; a list of obsolete files stored under the
key \'obsolete\'; a list of files remaining in the directory,
reverse sorted, stored under the key \'files\'.'

def cleanup_ondisk_files(self, hsh_path, **kwargs):

    def is_reclaimable(timestamp):
        return ((time.time() - float(timestamp)) > self.reclaim_age)
    files = listdir(hsh_path)
    files.sort(reverse=True)
    results = self.get_ondisk_files(files, hsh_path, verify=False, **kwargs)
    if (('ts_info' in results) and is_reclaimable(results['ts_info']['timestamp'])):
        remove_file(join(hsh_path, results['ts_info']['filename']))
        files.remove(results.pop('ts_info')['filename'])
    for file_info in results.get('possible_reclaim', []):
        if is_reclaimable(file_info['timestamp']):
            results.setdefault('obsolete', []).append(file_info)
    for file_info in results.get('obsolete', []):
        remove_file(join(hsh_path, file_info['filename']))
        files.remove(file_info['filename'])
    results['files'] = files
    return results
