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

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

* "pathlib" --- Object-oriented filesystem paths

  * Basic use

  * 純路徑

    * 通用特性

    * 運算子

    * Accessing individual parts

    * Methods and properties

  * Concrete paths

    * Methods

  * Correspondence to tools in the "os" module

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

* "fileinput" --- Iterate over lines from multiple input streams

* "stat" --- Interpreting "stat()" results

* "filecmp" --- File and Directory Comparisons

  * The "dircmp" class

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

  * 範例

  * 已棄用的函式和變數

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

* "fnmatch" --- Unix filename pattern matching

* "linecache" --- Random access to text lines

* "shutil" --- High-level file operations

  * 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 打開檔案以進行讀寫檔案的標準方法。
