Ejemplo n.º 1
0
 def _load_all_resources(path):
     application_items = {}
     for directory, file_names in FileHelper.walk(path):
         for file_name in file_names:
             file_location = os.path.join(path, directory, file_name)
             application_items[os.path.join(directory, file_name)] = dict(
                 sha1=FileHelper.sha1(file_location),
                 size=FileHelper.size(file_location),
                 mode=FileHelper.mode(file_location))
     return application_items
Ejemplo n.º 2
0
 def _load_all_resources(top_directory: str) -> dict:
     application_items = {}
     cf_ignore = CfIgnore(top_directory)
     for directory, file_names in FileHelper.walk(top_directory):
         for file_name in file_names:
             relative_file_location = os.path.join(directory, file_name)
             if not cf_ignore.is_entry_ignored(relative_file_location):
                 absolute_file_location = os.path.join(
                     top_directory, relative_file_location)
                 application_items[relative_file_location] = dict(
                     sha1=FileHelper.sha1(absolute_file_location),
                     size=FileHelper.size(absolute_file_location),
                     mode=FileHelper.mode(absolute_file_location))
     return application_items