def __init__(self, app, action = '', func = None, lst = [], *args): if func in ['copy', 'backup']: func, action = self.copy, 'Copying files' elif func in ['move', 'rename']: func, action = self.move, 'Moving files' #initilize size to copy self.total_size , self.cur_total_size = 0,0 self.cur_dest_size, self.cur_source_size = 0,0 self.dest_file = '' self.src_file = '' #self.time = 0 #self.speed = 0 #self.cur_size_previous = 0 #self.time_previous = 0 self.cur_tim, self.prev_tim = 0, 0 for i in range(len(lst)): self.total_size += files.get_size(os.path.join(args[0],lst[i])) ProcessBaseLoop.__init__(self, app, action, func, lst, *args) self.overwrite_all = not self.app.prefs.confirmations['overwrite'] self.overwrite_none = False
def __init__(self, app, action='', func=None, lst=[], *args): if func in ['copy', 'backup']: func, action = self.copy, 'Copying files' elif func in ['move', 'rename']: func, action = self.move, 'Moving files' #initilize size to copy self.total_size, self.cur_total_size = 0, 0 self.cur_dest_size, self.cur_source_size = 0, 0 self.dest_file = '' self.src_file = '' #self.time = 0 #self.speed = 0 #self.cur_size_previous = 0 #self.time_previous = 0 self.cur_tim, self.prev_tim = 0, 0 for i in range(len(lst)): self.total_size += files.get_size(os.path.join(args[0], lst[i])) ProcessBaseLoop.__init__(self, app, action, func, lst, *args) self.overwrite_all = not self.app.prefs.confirmations['overwrite'] self.overwrite_none = False
def __init__(self, app, func = None, lst = [], *args): self.app = app #self.unpack_flag = False if func == 'comp_dir': func = self.do_compress_uncompress_dir action= 'Compressing directory' elif func == 'uncomp_dir': func = self.do_compress_uncompress_dir action = 'Uncompressing directory' #self.unpack_flag = True elif func == 'ucomp_file': func = self.do_compress_uncompress_file action = '(Un)Compressing file' #elif func == 'uncomp_vfs': #func = self.do_compress_uncompress_dir #action = 'Creating archive VFS' ##self.unpack_flag = True #elif func == 'comp_vfs': #func = self.do_compress_vfs #action = 'Rebuilding archive' else: return #self.source_file = args[0]+os.sep+lst[0] self.source_file = os.path.join(args[0], lst[0]) self.source_size = files.get_size(self.source_file) ProcessBaseLoop.__init__(self, app, action, func, lst, *args)
def __init__(self, app, func=None, lst=[], *args): self.app = app #self.unpack_flag = False if func == 'comp_dir': func = self.do_compress_uncompress_dir action = 'Compressing directory' elif func == 'uncomp_dir': func = self.do_compress_uncompress_dir action = 'Uncompressing directory' #self.unpack_flag = True elif func == 'ucomp_file': func = self.do_compress_uncompress_file action = '(Un)Compressing file' #elif func == 'uncomp_vfs': #func = self.do_compress_uncompress_dir #action = 'Creating archive VFS' ##self.unpack_flag = True #elif func == 'comp_vfs': #func = self.do_compress_vfs #action = 'Rebuilding archive' else: return #self.source_file = args[0]+os.sep+lst[0] self.source_file = os.path.join(args[0], lst[0]) self.source_size = files.get_size(self.source_file) ProcessBaseLoop.__init__(self, app, action, func, lst, *args)
def __init__(self, app, lst = [], *args): ProcessBaseLoop.__init__(self, app, 'Deleting files', self.delete, lst, *args) self.delete_all = not self.app.prefs.confirmations['delete']
def __init__(self, app, lst=[], *args): ProcessBaseLoop.__init__(self, app, 'Deleting files', self.delete, lst, *args) self.delete_all = not self.app.prefs.confirmations['delete']