D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
lib
/
python3.9
/
site-packages
/
ipalib
/
__pycache__
/
Filename :
sysrestore.cpython-39.pyc
back
Copy
a }�f]6 � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dl Z e j r\d dlmZ nd dlm Z d dlmZ d dlmZ e j r�eZe�e�ZejZdZd ZG d d� d�ZG dd � d �ZdS )� )�absolute_importN)�sha256)�ConfigParser)�SafeConfigParser)�tasks)�pathszsysrestore.indexzsysrestore.statec @ s` e Zd ZdZeefdd�Zdd� Zdd� Zdd � Z d d� Z dd d�Zdd� Zdd� Z dd� ZdS )� FileStorez.Class for handling backup and restore of filesc C s4 || _ tj�| j |�| _t�� | _i | _| �� dS )z�Create a _StoreFiles object, that uses @path as the base directory. The file @path/sysrestore.index is used to store information about the original location of the saved files. N) �_path�os�path�join�_index�randomZRandom�files�_load)�selfr Z index_file� r �5/usr/lib/python3.9/site-packages/ipalib/sysrestore.py�__init__= s zFileStore.__init__c C sh t �d| j� i | _tdd�}t|_|�| j� |�� D ]*}|dkr8|� |�D ]\}}|| j|<