Пример #1
0
 def Backup(self, params):
     #Backup/Restore encrypted files to new path
     
     #Determine if backup or restore requested
     backup = IsRequestBackup(params)
     if(backup == None):
         console.out(61)
         return None
     
     #Now need to determine file location
     backupPath = DetermineBackupPath(params)
     if(backupPath == None): #Check if user aborted backup
         return None
         
     #Backup files
     if(backup):
         returnList = File.PerformBackup(backupPath)
         if(len(returnList) == 0):
             console.out(65)            
     else:
         returnList = File.PerformRestore(backupPath)
         if(len(returnList) == 0):
             console.out(66)
     if(len(returnList) > 0 and returnList[0] != "FAIL"):
         console.outs([67,68])
         for failedCopy in returnList:
             failedCopy = failedCopy.replace("\\", "/") #Clean up file path string
             console.SlowPrint(failedCopy, 0.02, ">")
     console.out(2)