利用Path 模組(Module)中的stat()方法即可取得目錄下特定檔案的資訊,如下範例:. from pathlib import Path file = Path("blog/about.py") print(file.stat())
確定! 回上一頁