def test_directory(self):
     path = "./tests/examples/testdirectorydonotinsertmoreitems"
     target_path = TargetPath(path)
     self.assertEqual(target_path.get_name(),
                      "testdirectorydonotinsertmoreitems")
     self.assertEqual(target_path.get_path(), path)
     self.assertEqual(target_path.get_directory(), "./tests/examples")
     info = target_path.get_info()
     self.assertTrue("st_atime" in info)
     self.assertTrue("st_ctime" in info)
     self.assertTrue("st_mtime" in info)
 def test_file(self):
     path = "./tests/examples/collie.jpg"
     target_path = TargetPath(path)
     self.assertEqual(target_path.get_name(), "collie.jpg")
     self.assertEqual(target_path.get_path(), path)
     self.assertEqual(target_path.get_directory(), "./tests/examples")
     info = target_path.get_info()
     self.assertEqual(info["st_size"], 19863)
     self.assertTrue("st_atime" in info)
     self.assertTrue("st_ctime" in info)
     self.assertTrue("st_mtime" in info)
Beispiel #3
0
 def is_valid_for(self, target_file: TargetPath):
     if target_file.is_file():
         if "SQLite" in target_file.get_type() and ("History" in target_file.get_name() \
                 or "places" in target_file.get_name()):
             return True
     return False
Beispiel #4
0
 def is_valid_for(self, target_file: TargetPath):
     if target_file.is_file():
         if "data" in target_file.get_type(
         ) and "MFT" in target_file.get_name():
             return True
     return False