backup

file backup utility method.

filetool.backup.backup_dir(filename, root_dir, ignore=None, ignore_ext=None, ignore_pattern=None)[source]

The backup utility method. Basically it just add files that need to be backupped to zip archives.

Parameters:
  • filename – the output file name, DO NOT NEED FILE EXTENSION.
  • root_dir – the directory you want to backup.
  • ignore – file or directory defined in this list will be ignored.
  • ignore_ext – file with extensions defined in this list will be ignored.
  • ignore_pattern – any file or directory that contains this pattern will be ignored.