檔案與目錄存取
**************

本章中描述的 module（模組）用於處理硬碟檔案和目錄。例如，有一些 module
用於讀取檔案的屬性、以可攜 (portable) 方式操作路徑以及建立暫存檔。本章
中的完整 module 清單是：

* "pathlib" --- 物件導向檔案系統路徑

  * 基本用法

  * 純路徑

    * 通用屬性

    * 運算子

    * 對個別組成的存取

    * 方法與屬性

  * 實體路徑

    * Expanding and resolving paths

    * Querying file type and status

    * Reading and writing files

    * 讀取目錄

    * 建立檔案與目錄

    * Renaming and deleting

    * Permissions and ownership

  * 與 "os" 模組裡的工具的對應關係

* "os.path" --- 常見的路徑名操作

* "fileinput" --- 逐列疊代多個輸入串流

* "stat" --- 直譯 "stat()" 的結果

* "filecmp" --- 檔案與目錄比較

  * The "dircmp" class

* "tempfile" --- 生成臨時檔案和目錄

  * 範例

  * 已棄用的函式和變數

* "glob" --- Unix 風格的路徑名稱模式擴展

* "fnmatch" --- Unix 檔案名稱模式比對

* "linecache" --- 隨機存取文字列

* "shutil" — 高階檔案操作

  * Directory and files operations

    * Platform-dependent efficient copy operations

    * copytree example

    * rmtree 範例

  * Archiving operations

    * Archiving example

    * Archiving example with *base_dir*

  * Querying the size of the output terminal

也參考:

  Module "os"
     作業系統介面，包括處理比 Python *檔案物件*更低階檔案的函式。

  Module "io"
     Python 的內建 I/O 函式庫，包含抽象類別和一些具體類別 (concrete
     class)，如檔案 I/O。

  內建函式 "open()"
     使用 Python 打開檔案以進行讀寫檔案的標準方法。
