Renamed function for consistency

This commit is contained in:
Nex 2021-08-15 20:01:33 +02:00
parent fdaf2fc760
commit 6af6c52f60
5 changed files with 5 additions and 5 deletions

View File

@ -107,7 +107,7 @@ class IOSExtraction(MVTModule):
return None
def _find_fs_files_from_pattern(self, root_paths):
def _get_fs_files_from_pattern(self, root_paths):
for root_path in root_paths:
for found_path in glob.glob(os.path.join(self.base_folder, root_path)):
if not os.path.exists(found_path):

View File

@ -32,7 +32,7 @@ class IOSVersionHistory(IOSExtraction):
}
def run(self):
for found_path in self._find_fs_files_from_pattern(IOS_ANALYTICS_JOURNAL_PATHS):
for found_path in self._get_fs_files_from_pattern(IOS_ANALYTICS_JOURNAL_PATHS):
with open(found_path, "r") as analytics_log:
log_line = json.loads(analytics_log.readline().strip())

View File

@ -23,7 +23,7 @@ class WebkitBase(IOSExtraction):
self.detected.append(item)
def _process_webkit_folder(self, root_paths):
for found_path in self._find_fs_files_from_pattern(root_paths):
for found_path in self._get_fs_files_from_pattern(root_paths):
key = os.path.relpath(found_path, self.base_folder)
for name in os.listdir(found_path):

View File

@ -83,5 +83,5 @@ class WebkitResourceLoadStatistics(IOSExtraction):
except Exception as e:
self.log.info("Unable to search for WebKit observations.db: %s", e)
elif self.is_fs_dump:
for db_path in self._find_fs_files_from_pattern(WEBKIT_RESOURCELOADSTATICS_ROOT_PATHS):
for db_path in self._get_fs_files_from_pattern(WEBKIT_RESOURCELOADSTATICS_ROOT_PATHS):
self._process_observations_db(db_path=db_path, key=os.path.relpath(db_path, self.base_folder))

View File

@ -117,7 +117,7 @@ class WebkitSessionResourceLog(IOSExtraction):
self.results[self.file_path] = self._extract_browsing_stats(self.file_path)
return
for log_file in self._find_fs_files_from_pattern(WEBKIT_RESOURCELOADSTATICS_ROOT_PATHS):
for log_file in self._get_fs_files_from_pattern(WEBKIT_RESOURCELOADSTATICS_ROOT_PATHS):
self.log.info("Found Safari browsing session resource log at path: %s", log_file)
key = os.path.relpath(log_file, self.base_folder)
self.results[key] = self._extract_browsing_stats(log_file)