def path_mode(self, path): if not self.path_mod.exists(path): return 0 return stat.S_IFMT(self.stat(path).st_mode)