-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilecmp.html
More file actions
382 lines (339 loc) · 24.8 KB
/
filecmp.html
File metadata and controls
382 lines (339 loc) · 24.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh_TW">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>11.5. filecmp — File and Directory Comparisons — Python 3.7.0 說明文件</title>
<link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/sidebar.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="在 Python 3.7.0 說明文件 中搜尋"
href="../_static/opensearch.xml"/>
<link rel="author" title="關於這些文件" href="../about.html" />
<link rel="index" title="索引" href="../genindex.html" />
<link rel="search" title="搜尋" href="../search.html" />
<link rel="copyright" title="Copyright" href="../copyright.html" />
<link rel="next" title="11.6. tempfile — Generate temporary files and directories" href="tempfile.html" />
<link rel="prev" title="11.4. stat — Interpreting stat() results" href="stat.html" />
<link rel="shortcut icon" type="image/png" href="../_static/py.png" />
<link rel="canonical" href="https://docs.python.org/3/library/filecmp.html" />
<script type="text/javascript" src="../_static/copybutton.js"></script>
<script type="text/javascript" src="../_static/switchers.js"></script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>瀏覽</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">索引</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python 模組索引"
>模組</a> |</li>
<li class="right" >
<a href="tempfile.html" title="11.6. tempfile — Generate temporary files and directories"
accesskey="N">下一頁</a> |</li>
<li class="right" >
<a href="stat.html" title="11.4. stat — Interpreting stat() results"
accesskey="P">上一頁</a> |</li>
<li><img src="../_static/py.png" alt=""
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="https://www.python.org/">Python</a> »</li>
<li>
<span class="language_switcher_placeholder">zh_TW</span>
<span class="version_switcher_placeholder">3.7.0</span>
<a href="../index.html">Documentation </a> »
</li>
<li class="nav-item nav-item-1"><a href="index.html" >Python 標準函式庫 (Standard Library)</a> »</li>
<li class="nav-item nav-item-2"><a href="filesys.html" accesskey="U">11. 檔案與目錄存取</a> »</li>
<li class="right">
<div class="inline-search" style="display: none" role="search">
<form class="inline-search" action="../search.html" method="get">
<input placeholder="Quick search" type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('.inline-search').show(0);</script>
|
</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-filecmp">
<span id="filecmp-file-and-directory-comparisons"></span><h1>11.5. <a class="reference internal" href="#module-filecmp" title="filecmp: Compare files efficiently."><code class="xref py py-mod docutils literal notranslate"><span class="pre">filecmp</span></code></a> — File and Directory Comparisons<a class="headerlink" href="#module-filecmp" title="本標題的永久連結">¶</a></h1>
<p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.7/Lib/filecmp.py">Lib/filecmp.py</a></p>
<hr class="docutils" />
<p>The <a class="reference internal" href="#module-filecmp" title="filecmp: Compare files efficiently."><code class="xref py py-mod docutils literal notranslate"><span class="pre">filecmp</span></code></a> module defines functions to compare files and directories,
with various optional time/correctness trade-offs. For comparing files,
see also the <a class="reference internal" href="difflib.html#module-difflib" title="difflib: Helpers for computing differences between objects."><code class="xref py py-mod docutils literal notranslate"><span class="pre">difflib</span></code></a> module.</p>
<p>The <a class="reference internal" href="#module-filecmp" title="filecmp: Compare files efficiently."><code class="xref py py-mod docutils literal notranslate"><span class="pre">filecmp</span></code></a> module defines the following functions:</p>
<dl class="function">
<dt id="filecmp.cmp">
<code class="descclassname">filecmp.</code><code class="descname">cmp</code><span class="sig-paren">(</span><em>f1</em>, <em>f2</em>, <em>shallow=True</em><span class="sig-paren">)</span><a class="headerlink" href="#filecmp.cmp" title="本定義的永久連結">¶</a></dt>
<dd><p>Compare the files named <em>f1</em> and <em>f2</em>, returning <code class="docutils literal notranslate"><span class="pre">True</span></code> if they seem equal,
<code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p>
<p>If <em>shallow</em> is true, files with identical <a class="reference internal" href="os.html#os.stat" title="os.stat"><code class="xref py py-func docutils literal notranslate"><span class="pre">os.stat()</span></code></a> signatures are
taken to be equal. Otherwise, the contents of the files are compared.</p>
<p>Note that no external programs are called from this function, giving it
portability and efficiency.</p>
<p>This function uses a cache for past comparisons and the results,
with cache entries invalidated if the <a class="reference internal" href="os.html#os.stat" title="os.stat"><code class="xref py py-func docutils literal notranslate"><span class="pre">os.stat()</span></code></a> information for the
file changes. The entire cache may be cleared using <a class="reference internal" href="#filecmp.clear_cache" title="filecmp.clear_cache"><code class="xref py py-func docutils literal notranslate"><span class="pre">clear_cache()</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="filecmp.cmpfiles">
<code class="descclassname">filecmp.</code><code class="descname">cmpfiles</code><span class="sig-paren">(</span><em>dir1</em>, <em>dir2</em>, <em>common</em>, <em>shallow=True</em><span class="sig-paren">)</span><a class="headerlink" href="#filecmp.cmpfiles" title="本定義的永久連結">¶</a></dt>
<dd><p>Compare the files in the two directories <em>dir1</em> and <em>dir2</em> whose names are
given by <em>common</em>.</p>
<p>Returns three lists of file names: <em>match</em>, <em>mismatch</em>,
<em>errors</em>. <em>match</em> contains the list of files that match, <em>mismatch</em> contains
the names of those that don’t, and <em>errors</em> lists the names of files which
could not be compared. Files are listed in <em>errors</em> if they don’t exist in
one of the directories, the user lacks permission to read them or if the
comparison could not be done for some other reason.</p>
<p>The <em>shallow</em> parameter has the same meaning and default value as for
<a class="reference internal" href="#filecmp.cmp" title="filecmp.cmp"><code class="xref py py-func docutils literal notranslate"><span class="pre">filecmp.cmp()</span></code></a>.</p>
<p>For example, <code class="docutils literal notranslate"><span class="pre">cmpfiles('a',</span> <span class="pre">'b',</span> <span class="pre">['c',</span> <span class="pre">'d/e'])</span></code> will compare <code class="docutils literal notranslate"><span class="pre">a/c</span></code> with
<code class="docutils literal notranslate"><span class="pre">b/c</span></code> and <code class="docutils literal notranslate"><span class="pre">a/d/e</span></code> with <code class="docutils literal notranslate"><span class="pre">b/d/e</span></code>. <code class="docutils literal notranslate"><span class="pre">'c'</span></code> and <code class="docutils literal notranslate"><span class="pre">'d/e'</span></code> will each be in
one of the three returned lists.</p>
</dd></dl>
<dl class="function">
<dt id="filecmp.clear_cache">
<code class="descclassname">filecmp.</code><code class="descname">clear_cache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#filecmp.clear_cache" title="本定義的永久連結">¶</a></dt>
<dd><p>Clear the filecmp cache. This may be useful if a file is compared so quickly
after it is modified that it is within the mtime resolution of
the underlying filesystem.</p>
<div class="versionadded">
<p><span class="versionmodified">3.4 版新加入.</span></p>
</div>
</dd></dl>
<div class="section" id="the-dircmp-class">
<span id="dircmp-objects"></span><h2>11.5.1. The <a class="reference internal" href="#filecmp.dircmp" title="filecmp.dircmp"><code class="xref py py-class docutils literal notranslate"><span class="pre">dircmp</span></code></a> class<a class="headerlink" href="#the-dircmp-class" title="本標題的永久連結">¶</a></h2>
<dl class="class">
<dt id="filecmp.dircmp">
<em class="property">class </em><code class="descclassname">filecmp.</code><code class="descname">dircmp</code><span class="sig-paren">(</span><em>a</em>, <em>b</em>, <em>ignore=None</em>, <em>hide=None</em><span class="sig-paren">)</span><a class="headerlink" href="#filecmp.dircmp" title="本定義的永久連結">¶</a></dt>
<dd><p>Construct a new directory comparison object, to compare the directories <em>a</em>
and <em>b</em>. <em>ignore</em> is a list of names to ignore, and defaults to
<a class="reference internal" href="#filecmp.DEFAULT_IGNORES" title="filecmp.DEFAULT_IGNORES"><code class="xref py py-attr docutils literal notranslate"><span class="pre">filecmp.DEFAULT_IGNORES</span></code></a>. <em>hide</em> is a list of names to hide, and
defaults to <code class="docutils literal notranslate"><span class="pre">[os.curdir,</span> <span class="pre">os.pardir]</span></code>.</p>
<p>The <a class="reference internal" href="#filecmp.dircmp" title="filecmp.dircmp"><code class="xref py py-class docutils literal notranslate"><span class="pre">dircmp</span></code></a> class compares files by doing <em>shallow</em> comparisons
as described for <a class="reference internal" href="#filecmp.cmp" title="filecmp.cmp"><code class="xref py py-func docutils literal notranslate"><span class="pre">filecmp.cmp()</span></code></a>.</p>
<p>The <a class="reference internal" href="#filecmp.dircmp" title="filecmp.dircmp"><code class="xref py py-class docutils literal notranslate"><span class="pre">dircmp</span></code></a> class provides the following methods:</p>
<dl class="method">
<dt id="filecmp.dircmp.report">
<code class="descname">report</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#filecmp.dircmp.report" title="本定義的永久連結">¶</a></dt>
<dd><p>Print (to <a class="reference internal" href="sys.html#sys.stdout" title="sys.stdout"><code class="xref py py-data docutils literal notranslate"><span class="pre">sys.stdout</span></code></a>) a comparison between <em>a</em> and <em>b</em>.</p>
</dd></dl>
<dl class="method">
<dt id="filecmp.dircmp.report_partial_closure">
<code class="descname">report_partial_closure</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#filecmp.dircmp.report_partial_closure" title="本定義的永久連結">¶</a></dt>
<dd><p>Print a comparison between <em>a</em> and <em>b</em> and common immediate
subdirectories.</p>
</dd></dl>
<dl class="method">
<dt id="filecmp.dircmp.report_full_closure">
<code class="descname">report_full_closure</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#filecmp.dircmp.report_full_closure" title="本定義的永久連結">¶</a></dt>
<dd><p>Print a comparison between <em>a</em> and <em>b</em> and common subdirectories
(recursively).</p>
</dd></dl>
<p>The <a class="reference internal" href="#filecmp.dircmp" title="filecmp.dircmp"><code class="xref py py-class docutils literal notranslate"><span class="pre">dircmp</span></code></a> class offers a number of interesting attributes that may be
used to get various bits of information about the directory trees being
compared.</p>
<p>Note that via <a class="reference internal" href="../reference/datamodel.html#object.__getattr__" title="object.__getattr__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">__getattr__()</span></code></a> hooks, all attributes are computed lazily,
so there is no speed penalty if only those attributes which are lightweight
to compute are used.</p>
<dl class="attribute">
<dt id="filecmp.dircmp.left">
<code class="descname">left</code><a class="headerlink" href="#filecmp.dircmp.left" title="本定義的永久連結">¶</a></dt>
<dd><p>The directory <em>a</em>.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.right">
<code class="descname">right</code><a class="headerlink" href="#filecmp.dircmp.right" title="本定義的永久連結">¶</a></dt>
<dd><p>The directory <em>b</em>.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.left_list">
<code class="descname">left_list</code><a class="headerlink" href="#filecmp.dircmp.left_list" title="本定義的永久連結">¶</a></dt>
<dd><p>Files and subdirectories in <em>a</em>, filtered by <em>hide</em> and <em>ignore</em>.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.right_list">
<code class="descname">right_list</code><a class="headerlink" href="#filecmp.dircmp.right_list" title="本定義的永久連結">¶</a></dt>
<dd><p>Files and subdirectories in <em>b</em>, filtered by <em>hide</em> and <em>ignore</em>.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.common">
<code class="descname">common</code><a class="headerlink" href="#filecmp.dircmp.common" title="本定義的永久連結">¶</a></dt>
<dd><p>Files and subdirectories in both <em>a</em> and <em>b</em>.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.left_only">
<code class="descname">left_only</code><a class="headerlink" href="#filecmp.dircmp.left_only" title="本定義的永久連結">¶</a></dt>
<dd><p>Files and subdirectories only in <em>a</em>.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.right_only">
<code class="descname">right_only</code><a class="headerlink" href="#filecmp.dircmp.right_only" title="本定義的永久連結">¶</a></dt>
<dd><p>Files and subdirectories only in <em>b</em>.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.common_dirs">
<code class="descname">common_dirs</code><a class="headerlink" href="#filecmp.dircmp.common_dirs" title="本定義的永久連結">¶</a></dt>
<dd><p>Subdirectories in both <em>a</em> and <em>b</em>.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.common_files">
<code class="descname">common_files</code><a class="headerlink" href="#filecmp.dircmp.common_files" title="本定義的永久連結">¶</a></dt>
<dd><p>Files in both <em>a</em> and <em>b</em>.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.common_funny">
<code class="descname">common_funny</code><a class="headerlink" href="#filecmp.dircmp.common_funny" title="本定義的永久連結">¶</a></dt>
<dd><p>Names in both <em>a</em> and <em>b</em>, such that the type differs between the
directories, or names for which <a class="reference internal" href="os.html#os.stat" title="os.stat"><code class="xref py py-func docutils literal notranslate"><span class="pre">os.stat()</span></code></a> reports an error.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.same_files">
<code class="descname">same_files</code><a class="headerlink" href="#filecmp.dircmp.same_files" title="本定義的永久連結">¶</a></dt>
<dd><p>Files which are identical in both <em>a</em> and <em>b</em>, using the class’s
file comparison operator.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.diff_files">
<code class="descname">diff_files</code><a class="headerlink" href="#filecmp.dircmp.diff_files" title="本定義的永久連結">¶</a></dt>
<dd><p>Files which are in both <em>a</em> and <em>b</em>, whose contents differ according
to the class’s file comparison operator.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.funny_files">
<code class="descname">funny_files</code><a class="headerlink" href="#filecmp.dircmp.funny_files" title="本定義的永久連結">¶</a></dt>
<dd><p>Files which are in both <em>a</em> and <em>b</em>, but could not be compared.</p>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.dircmp.subdirs">
<code class="descname">subdirs</code><a class="headerlink" href="#filecmp.dircmp.subdirs" title="本定義的永久連結">¶</a></dt>
<dd><p>A dictionary mapping names in <a class="reference internal" href="#filecmp.dircmp.common_dirs" title="filecmp.dircmp.common_dirs"><code class="xref py py-attr docutils literal notranslate"><span class="pre">common_dirs</span></code></a> to <a class="reference internal" href="#filecmp.dircmp" title="filecmp.dircmp"><code class="xref py py-class docutils literal notranslate"><span class="pre">dircmp</span></code></a>
objects.</p>
</dd></dl>
</dd></dl>
<dl class="attribute">
<dt id="filecmp.DEFAULT_IGNORES">
<code class="descclassname">filecmp.</code><code class="descname">DEFAULT_IGNORES</code><a class="headerlink" href="#filecmp.DEFAULT_IGNORES" title="本定義的永久連結">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">3.4 版新加入.</span></p>
</div>
<p>List of directories ignored by <a class="reference internal" href="#filecmp.dircmp" title="filecmp.dircmp"><code class="xref py py-class docutils literal notranslate"><span class="pre">dircmp</span></code></a> by default.</p>
</dd></dl>
<p>Here is a simplified example of using the <code class="docutils literal notranslate"><span class="pre">subdirs</span></code> attribute to search
recursively through two directories to show common different files:</p>
<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">filecmp</span> <span class="k">import</span> <span class="n">dircmp</span>
<span class="gp">>>> </span><span class="k">def</span> <span class="nf">print_diff_files</span><span class="p">(</span><span class="n">dcmp</span><span class="p">):</span>
<span class="gp">... </span> <span class="k">for</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">dcmp</span><span class="o">.</span><span class="n">diff_files</span><span class="p">:</span>
<span class="gp">... </span> <span class="nb">print</span><span class="p">(</span><span class="s2">"diff_file </span><span class="si">%s</span><span class="s2"> found in </span><span class="si">%s</span><span class="s2"> and </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">dcmp</span><span class="o">.</span><span class="n">left</span><span class="p">,</span>
<span class="gp">... </span> <span class="n">dcmp</span><span class="o">.</span><span class="n">right</span><span class="p">))</span>
<span class="gp">... </span> <span class="k">for</span> <span class="n">sub_dcmp</span> <span class="ow">in</span> <span class="n">dcmp</span><span class="o">.</span><span class="n">subdirs</span><span class="o">.</span><span class="n">values</span><span class="p">():</span>
<span class="gp">... </span> <span class="n">print_diff_files</span><span class="p">(</span><span class="n">sub_dcmp</span><span class="p">)</span>
<span class="gp">...</span>
<span class="gp">>>> </span><span class="n">dcmp</span> <span class="o">=</span> <span class="n">dircmp</span><span class="p">(</span><span class="s1">'dir1'</span><span class="p">,</span> <span class="s1">'dir2'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">print_diff_files</span><span class="p">(</span><span class="n">dcmp</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">目錄</a></h3>
<ul>
<li><a class="reference internal" href="#">11.5. <code class="docutils literal notranslate"><span class="pre">filecmp</span></code> — File and Directory Comparisons</a><ul>
<li><a class="reference internal" href="#the-dircmp-class">11.5.1. The <code class="docutils literal notranslate"><span class="pre">dircmp</span></code> class</a></li>
</ul>
</li>
</ul>
<h4>上個主題</h4>
<p class="topless"><a href="stat.html"
title="上一章">11.4. <code class="docutils literal notranslate"><span class="pre">stat</span></code> — Interpreting <code class="docutils literal notranslate"><span class="pre">stat()</span></code> results</a></p>
<h4>下個主題</h4>
<p class="topless"><a href="tempfile.html"
title="下一章">11.6. <code class="docutils literal notranslate"><span class="pre">tempfile</span></code> — Generate temporary files and directories</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../bugs.html">Report a Bug</a></li>
<li>
<a href="https://github.com/python/cpython/blob/3.7/Doc/library/filecmp.rst"
rel="nofollow">Show Source
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>瀏覽</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>索引</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python 模組索引"
>模組</a> |</li>
<li class="right" >
<a href="tempfile.html" title="11.6. tempfile — Generate temporary files and directories"
>下一頁</a> |</li>
<li class="right" >
<a href="stat.html" title="11.4. stat — Interpreting stat() results"
>上一頁</a> |</li>
<li><img src="../_static/py.png" alt=""
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="https://www.python.org/">Python</a> »</li>
<li>
<span class="language_switcher_placeholder">zh_TW</span>
<span class="version_switcher_placeholder">3.7.0</span>
<a href="../index.html">Documentation </a> »
</li>
<li class="nav-item nav-item-1"><a href="index.html" >Python 標準函式庫 (Standard Library)</a> »</li>
<li class="nav-item nav-item-2"><a href="filesys.html" >11. 檔案與目錄存取</a> »</li>
<li class="right">
<div class="inline-search" style="display: none" role="search">
<form class="inline-search" action="../search.html" method="get">
<input placeholder="Quick search" type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('.inline-search').show(0);</script>
|
</li>
</ul>
</div>
<div class="footer">
© <a href="../copyright.html">Copyright</a> 2001-2018, Python Software Foundation.
<br />
The Python Software Foundation is a non-profit corporation.
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
Last updated on 8月 22, 2018.
<a href="../bugs.html">Found a bug</a>?
<br />
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.7.7.
</div>
</body>
</html>