def get_mode(path, follow_symlinks=True):
    return stats(os.path.expanduser(path), follow_symlinks=follow_symlinks).get('mode', '')
Relativize the keys in the dict relative to basepath
dataset/ETHPy150Open saltstack/salt/salt/modules/file.py/get_mode--crossover with--dataset/ETHPy150Open conan-io/conan/conans/server/store/file_manager.py/FileManager._relativize_keys