Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)

Side by Side Diff: Doc/library/os.path.rst

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/nntplib.rst ('k') | Doc/library/os.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`os.path` --- Common pathname manipulations 1 :mod:`os.path` --- Common pathname manipulations
2 ================================================ 2 ================================================
3 3
4 .. module:: os.path 4 .. module:: os.path
5 :synopsis: Operations on pathnames. 5 :synopsis: Operations on pathnames.
6 6
7 .. index:: single: path; operations 7 .. index:: single: path; operations
8 8
9 This module implements some useful functions on pathnames. To read or 9 This module implements some useful functions on pathnames. To read or
10 write files see :func:`open`, and for accessing the filesystem see the 10 write files see :func:`open`, and for accessing the filesystem see the
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 or whether :file:`path/..` and *path* point to the same i-node on the same 183 or whether :file:`path/..` and *path* point to the same i-node on the same
184 device --- this should detect mount points for all Unix and POSIX variants. 184 device --- this should detect mount points for all Unix and POSIX variants.
185 185
186 186
187 .. function:: join(path1[, path2[, ...]]) 187 .. function:: join(path1[, path2[, ...]])
188 188
189 Join one or more path components intelligently. If any component is an absol ute 189 Join one or more path components intelligently. If any component is an absol ute
190 path, all previous components (on Windows, including the previous drive lette r, 190 path, all previous components (on Windows, including the previous drive lette r,
191 if there was one) are thrown away, and joining continues. The return value i s 191 if there was one) are thrown away, and joining continues. The return value i s
192 the concatenation of *path1*, and optionally *path2*, etc., with exactly one 192 the concatenation of *path1*, and optionally *path2*, etc., with exactly one
193 directory separator (``os.sep``) following each non-empty part except the las t. 193 directory separator (``os.sep``) inserted between components, unless *path2* is
194 (This means that an empty last part will result in a path that ends with a 194 empty. Note that on Windows, since there is a current directory for each dri ve,
195 separator.) Note that on Windows, since there is a current directory for 195 ``os.path.join("c:", "foo")`` represents a path relative to the current
196 each drive, ``os.path.join("c:", "foo")`` represents a path relative to the 196 directory on drive :file:`C:` (:file:`c:foo`), not :file:`c:\\foo`.
197 current directory on drive :file:`C:` (:file:`c:foo`), not :file:`c:\\foo`.
198 197
199 198
200 .. function:: normcase(path) 199 .. function:: normcase(path)
201 200
202 Normalize the case of a pathname. On Unix and Mac OS X, this returns the 201 Normalize the case of a pathname. On Unix and Mac OS X, this returns the
203 path unchanged; on case-insensitive filesystems, it converts the path to 202 path unchanged; on case-insensitive filesystems, it converts the path to
204 lowercase. On Windows, it also converts forward slashes to backward slashes. 203 lowercase. On Windows, it also converts forward slashes to backward slashes.
205 Raise a TypeError if the type of *path* is not ``str`` or ``bytes``. 204 Raise a TypeError if the type of *path* is not ``str`` or ``bytes``.
206 205
207 206
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 the path (such as ``r'\path\file.ext'``). For paths containing drive letter s, 314 the path (such as ``r'\path\file.ext'``). For paths containing drive letter s,
316 *unc* will always be the empty string. 315 *unc* will always be the empty string.
317 316
318 Availability: Windows. 317 Availability: Windows.
319 318
320 319
321 .. data:: supports_unicode_filenames 320 .. data:: supports_unicode_filenames
322 321
323 True if arbitrary Unicode strings can be used as file names (within limitatio ns 322 True if arbitrary Unicode strings can be used as file names (within limitatio ns
324 imposed by the file system). 323 imposed by the file system).
OLDNEW
« no previous file with comments | « Doc/library/nntplib.rst ('k') | Doc/library/os.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+