@@ -2957,20 +2957,26 @@ msgid ""
29572957"a directory; return ``False`` if the entry is or points to any other kind of"
29582958" file, or if it doesn't exist anymore."
29592959msgstr ""
2960+ "如果本条目是目录,或是指向目录的符号链接,则返回 ``True``。如果本条目是文件,或指向任何其他类型的文件,或该目录不再存在,则返回 "
2961+ "``False``。"
29602962
29612963#: /home/travis/build/python/cpython-doc-catalog/Doc/library/os.rst:2328
29622964msgid ""
29632965"If *follow_symlinks* is ``False``, return ``True`` only if this entry is a "
29642966"directory (without following symlinks); return ``False`` if the entry is any"
29652967" other kind of file or if it doesn't exist anymore."
29662968msgstr ""
2969+ "如果 *follow_symlinks* 是 ``False``,那么仅当本条目为目录时返回 "
2970+ "``True``(不跟踪符号链接),如果本条目是任何类型的文件,或该文件不再存在,则返回 ``False``。"
29672971
29682972#: /home/travis/build/python/cpython-doc-catalog/Doc/library/os.rst:2332
29692973msgid ""
29702974"The result is cached on the ``os.DirEntry`` object, with a separate cache "
29712975"for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` along "
29722976"with :func:`stat.S_ISDIR` to fetch up-to-date information."
29732977msgstr ""
2978+ "这一结果是缓存在 ``os.DirEntry`` 对象中的,且 *follow_symlinks* 为 ``True`` 和 ``False`` "
2979+ "时的缓存是分开的。请调用 :func:`os.stat` 和 :func:`stat.S_ISDIR` 来获取最新信息。"
29742980
29752981#: /home/travis/build/python/cpython-doc-catalog/Doc/library/os.rst:2336
29762982msgid ""
@@ -2981,27 +2987,36 @@ msgid ""
29812987"system call will be required to follow the symlink unless *follow_symlinks* "
29822988"is ``False``."
29832989msgstr ""
2990+ "一开始没有缓存时,大多数情况下不需要系统调用。特别是对于非符号链接,Windows 和 Unix 都不需要系统调用,除非某些 Unix "
2991+ "文件系统(如网络文件系统)返回了 ``dirent.d_type == DT_UNKNOWN``。如果本条目是符号链接,则需要一次系统调用来跟踪它(除非"
2992+ " *follow_symlinks* 为 ``False``)。"
29842993
29852994#: /home/travis/build/python/cpython-doc-catalog/Doc/library/os.rst:2343
29862995#: /home/travis/build/python/cpython-doc-catalog/Doc/library/os.rst:2373
29872996msgid ""
29882997"This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but "
29892998":exc:`FileNotFoundError` is caught and not raised."
29902999msgstr ""
3000+ "本方法可能抛出 :exc:`OSError` 异常,如 :exc:`PermissionError` 异常,但 "
3001+ ":exc:`FileNotFoundError` 异常会被内部捕获且不会抛出。"
29913002
29923003#: /home/travis/build/python/cpython-doc-catalog/Doc/library/os.rst:2348
29933004msgid ""
29943005"Return ``True`` if this entry is a file or a symbolic link pointing to a "
29953006"file; return ``False`` if the entry is or points to a directory or other "
29963007"non-file entry, or if it doesn't exist anymore."
29973008msgstr ""
3009+ "如果本条目是文件,或是指向文件的符号链接,则返回 ``True``。如果本条目是目录,或指向目录,或指向其他非文件条目,或该文件不再存在,则返回 "
3010+ "``False``。"
29983011
29993012#: /home/travis/build/python/cpython-doc-catalog/Doc/library/os.rst:2352
30003013msgid ""
30013014"If *follow_symlinks* is ``False``, return ``True`` only if this entry is a "
30023015"file (without following symlinks); return ``False`` if the entry is a "
30033016"directory or other non-file entry, or if it doesn't exist anymore."
30043017msgstr ""
3018+ "如果 *follow_symlinks* 是 ``False``,那么仅当本条目为文件时返回 "
3019+ "``True``(不跟踪符号链接),如果本条目是目录或其他非文件条目,或该文件不再存在,则返回 ``False``。"
30053020
30063021#: /home/travis/build/python/cpython-doc-catalog/Doc/library/os.rst:2356
30073022msgid ""
0 commit comments