mirror of
https://github.com/kevinveenbirkenbach/splitted-secret.git
synced 2025-09-09 19:57:17 +02:00
Implemented cleanup for user
This commit is contained in:
@@ -20,6 +20,12 @@ class Cleanup(AbstractSplittedSecret):
|
||||
def deleteAllEncryptedFiles(self):
|
||||
for folder_path in self.encrypted_files_folders:
|
||||
self.deleteAllFilesInFolder(folder_path)
|
||||
|
||||
def cleanupForUser(self,user):
|
||||
self.executeCommand('find "' + self.encrypted_folder + '" -not -name "*' + str(user) +'*" -type f -print | xargs rm -v')
|
||||
print(self.getCommandString())
|
||||
print(self.getOutputString())
|
||||
|
||||
|
||||
def deleteAll(self):
|
||||
self.deleteAllEncryptedFiles()
|
||||
|
Reference in New Issue
Block a user