def get_save_mongo_db_path(did):
    path = Path(hive_setting.VAULTS_BASE_DIR)
    if path.is_absolute():
        path = path / did_tail_part(did) / "mongo_db"
    else:
        path = path.resolve() / did_tail_part(did) / "mongo_db"
    return path.resolve()
def get_vault_backup_path(did):
    path = Path(hive_setting.BACKUP_VAULTS_BASE_DIR)
    if path.is_absolute():
        path = path / did_tail_part(did)
    else:
        path = path.resolve() / did_tail_part(did)
    return path.resolve()
Пример #3
0
def st_get_vault_path(user_did):
    """
    Get the root dir of the vault.
    :param user_did: The user DID.
    :return: Path: the path of the vault root.
    """
    path = Path(hive_setting.VAULTS_BASE_DIR)
    if path.is_absolute():
        path = path / did_tail_part(user_did)
    else:
        path = path.resolve() / did_tail_part(user_did)
    return path.resolve()
def get_vault_backup_relative_path(did):
    return did_tail_part(did)
Пример #5
0
def get_user_did_path(did):
    """ get the path of the user did """
    path = Path(hive_setting.VAULTS_BASE_DIR)
    return (path /
            did_tail_part(did)) if path.is_absolute() else (path.resolve() /
                                                            did_tail_part(did))