':param path: full path to directory'

def _hash_suffix_dir(self, path):

    hashes = defaultdict(hashlib.md5)
    try:
        path_contents = sorted(os.listdir(path))
    except OSError as err:
        if (err.errno in (errno.ENOTDIR, errno.ENOENT)):
            raise PathNotDir()
        raise
    for hsh in path_contents:
        hsh_path = join(path, hsh)
        try:
            ondisk_info = self.cleanup_ondisk_files(hsh_path)
        except OSError as err:
            if (err.errno == errno.ENOTDIR):
                partition_path = dirname(path)
                objects_path = dirname(partition_path)
                device_path = dirname(objects_path)
                quar_path = quarantine_renamer(device_path, hsh_path)
                logging.exception(_('Quarantined    %(hsh_path)s    to    %(quar_path)s    because    it    is    not    a    directory'), {'hsh_path': hsh_path, 'quar_path': quar_path})
                continue
            raise
        if (not ondisk_info['files']):
            try:
                os.rmdir(hsh_path)
            except OSError:
                pass
            continue
        for key in (k for k in ('meta_info', 'ts_info') if (k in ondisk_info)):
            info = ondisk_info[key]
            hashes[None].update((info['timestamp'].internal + info['ext']))
        self._update_suffix_hashes(hashes, ondisk_info)
        if ('ctype_info' in ondisk_info):
            info = ondisk_info['ctype_info']
            hashes[None].update((info['ctype_timestamp'].internal + '_ctype'))
    try:
        os.rmdir(path)
    except OSError as e:
        if (e.errno == errno.ENOENT):
            raise PathNotDir()
    else:
        raise PathNotDir()
    return hashes
