Esempio n. 1
0
 def open_files(self):
     if self.pid in (0, 4):
         return []
     retlist = []
     # Filenames come in in native format like:
     # "\Device\HarddiskVolume1\Windows\systemew\file.txt"
     # Convert the first part in the corresponding drive letter
     # (e.g. "C:\") by using Windows's QueryDosDevice()
     raw_file_names = cext.proc_open_files(self.pid)
     for file in raw_file_names:
         file = _convert_raw_path(file)
         if isfile_strict(file) and file not in retlist:
             ntuple = _common.popenfile(file, -1)
             retlist.append(ntuple)
     return retlist
Esempio n. 2
0
 def open_files(self):
     if self.pid in (0, 4):
         return []
     retlist = []
     # Filenames come in in native format like:
     # "\Device\HarddiskVolume1\Windows\systemew\file.txt"
     # Convert the first part in the corresponding drive letter
     # (e.g. "C:\") by using Windows's QueryDosDevice()
     raw_file_names = cext.proc_open_files(self.pid)
     for file in raw_file_names:
         file = _convert_raw_path(file)
         if isfile_strict(file) and file not in retlist:
             ntuple = _common.popenfile(file, -1)
             retlist.append(ntuple)
     return retlist