MCPcopy Create free account
hub / github.com/qilingframework/qiling / __open_new

Method __open_new

qiling/os/mapper.py:121–127  ·  view source on GitHub ↗
(self, absvpath: str, opener: Callable, *args)

Source from the content-addressed store, hash-verified

119 return obj
120
121 def __open_new(self, absvpath: str, opener: Callable, *args) -> Any:
122 hpath = self.path.virtual_to_host_path(absvpath)
123
124 if not self.path.is_safe_host_path(hpath):
125 raise PermissionError(f'unsafe path: {hpath}')
126
127 return opener(hpath, *args)
128
129 def open_ql_file(self, vpath: str, flags: int, mode: int):
130 absvpath = self.path.virtual_abspath(vpath)

Callers

nothing calls this directly

Calls 2

virtual_to_host_pathMethod · 0.80
is_safe_host_pathMethod · 0.80

Tested by

no test coverage detected