好像有 parents 包含给定路径的所有父目录的元素。例如,如果您从以下内容开始: >>> import pathlib >>> p = pathlib.Path('/path/to/my/file')
確定! 回上一頁