def _winpath_to_parsec(path: str) -> FsPath: # Given / is not allowed, no need to check if path already contains it return FsPath(unwinify_entry_name(path.replace("\\", "/")))
def get_dir_info_by_name(self, file_context, file_name): child_name = unwinify_entry_name(file_name) stat = self.fs_access.entry_info(file_context.path / child_name) entry = {"file_name": file_name, **stat_to_winfsp_attributes(stat)} return entry
def _winpath_to_parsec(path: str) -> FsPath: # Given / is not allowed, no need to check if path already contains it return FsPath( tuple(unwinify_entry_name(x) for x in path.replace("\\", "/").split("/") if x != "") )