@@ -787,26 +787,37 @@ msgid ""
787
787
"Return the name of the user owning the file. :exc:`KeyError` is raised if "
788
788
"the file's uid isn't found in the system database."
789
789
msgstr ""
790
+ "回傳擁有該檔案的用戶的名稱。如果在系統資料庫中找不到該檔案的 uid ,則會引發 :"
791
+ "exc:`KeyError`。"
790
792
791
793
#: ../../library/pathlib.rst:1014
792
794
msgid "Return the binary contents of the pointed-to file as a bytes object::"
793
795
msgstr ""
796
+ "將指向檔案的二進制內容以一個位元組 (bytes) 物件回傳:\n"
797
+ "\n"
798
+ "::"
794
799
795
800
#: ../../library/pathlib.rst:1027
796
801
msgid "Return the decoded contents of the pointed-to file as a string::"
797
802
msgstr ""
803
+ "將指向檔案的解碼內容以字串形式回傳:\n"
804
+ "\n"
805
+ "::"
798
806
799
807
#: ../../library/pathlib.rst:1035
800
808
msgid ""
801
809
"The file is opened and then closed. The optional parameters have the same "
802
810
"meaning as in :func:`open`."
803
- msgstr ""
811
+ msgstr "該檔案被打開並且隨後關閉。選填參數的含義與 :func:`open` 函數中的相同。 "
804
812
805
813
#: ../../library/pathlib.rst:1043
806
814
msgid ""
807
815
"Return the path to which the symbolic link points (as returned by :func:`os."
808
816
"readlink`)::"
809
817
msgstr ""
818
+ "回傳符號連結指向的路徑(如 :func:`os.readlink` 的回傳值):\n"
819
+ "\n"
820
+ "::"
810
821
811
822
#: ../../library/pathlib.rst:1056
812
823
msgid ""
@@ -816,48 +827,67 @@ msgid ""
816
827
"*target* exists, :exc:`FileExistsError` will be raised. *target* can be "
817
828
"either a string or another path object::"
818
829
msgstr ""
830
+ "將此檔案或目錄重新命名為所提供的 *target* ,並回傳一個新的路徑 (Path) 物件指"
831
+ "向該 *target* 。在 Unix 系統上,若 *target* 存在且為一個檔案,若使用者有權"
832
+ "限,則會在不顯示訊息的情況下進行取代。在 Windows 系統上,若 *target* 存在,則"
833
+ "會引發 :exc:`FileExistsError` 錯誤。*target* 可以是字串或另一個路徑物件:\n"
834
+ "\n"
835
+ "::"
819
836
820
837
#: ../../library/pathlib.rst:1071 ../../library/pathlib.rst:1087
821
838
msgid ""
822
839
"The target path may be absolute or relative. Relative paths are interpreted "
823
840
"relative to the current working directory, *not* the directory of the Path "
824
841
"object."
825
842
msgstr ""
843
+ "目標路徑可以是絕對路徑或相對路徑。相對路徑會相對於當前的工作目錄進行解釋,"
844
+ "*not* 相對於路徑物件所在的目錄。"
826
845
827
846
#: ../../library/pathlib.rst:1075
828
847
msgid ""
829
848
"It is implemented in terms of :func:`os.rename` and gives the same "
830
849
"guarantees."
831
- msgstr ""
850
+ msgstr "此功能是使用 :func:`os.rename` 實現的,並提供相同的保證。 "
832
851
833
852
#: ../../library/pathlib.rst:1077 ../../library/pathlib.rst:1091
834
853
msgid "Added return value, return the new Path instance."
835
- msgstr ""
854
+ msgstr "新增了回傳值,回傳新的路徑 (Path) 物件。 "
836
855
837
856
#: ../../library/pathlib.rst:1083
838
857
msgid ""
839
858
"Rename this file or directory to the given *target*, and return a new Path "
840
859
"instance pointing to *target*. If *target* points to an existing file or "
841
860
"empty directory, it will be unconditionally replaced."
842
861
msgstr ""
862
+ "將此檔案或目錄重新命名為給定的 *target* ,並回傳一個指向 *target* 的新路徑物"
863
+ "件。如果 *target* 指向一個現有的檔案或空目錄,它將被無條件地取代。"
843
864
844
865
#: ../../library/pathlib.rst:1097
845
866
msgid ""
846
867
"Make the path absolute, without normalization or resolving symlinks. Returns "
847
868
"a new path object::"
848
869
msgstr ""
870
+ "使路徑成為絕對路徑,不進行標準化或解析符號連結。 回傳一個新的路徑物件:\n"
871
+ "\n"
872
+ "::"
849
873
850
874
#: ../../library/pathlib.rst:1109
851
875
msgid ""
852
876
"Make the path absolute, resolving any symlinks. A new path object is "
853
877
"returned::"
854
878
msgstr ""
879
+ "將路徑轉換為絕對路徑,解析所有符號連結。回傳一個新的路徑物件:\n"
880
+ "\n"
881
+ "::"
855
882
856
883
#: ../../library/pathlib.rst:1118
857
884
msgid ""
858
885
"\" ``..``\" components are also eliminated (this is the only method to do "
859
886
"so)::"
860
887
msgstr ""
888
+ "同時也會消除 \" ``..``\" 的路徑組件(這是唯一的方法):\n"
889
+ "\n"
890
+ "::"
861
891
862
892
#: ../../library/pathlib.rst:1124
863
893
msgid ""
@@ -867,16 +897,24 @@ msgid ""
867
897
"If an infinite loop is encountered along the resolution path, :exc:"
868
898
"`RuntimeError` is raised."
869
899
msgstr ""
900
+ "如果路徑不存在且 *strict* 為 ``True``, 則引發 :exc:`FileNotFoundError`。如"
901
+ "果 *strict* 為 ``False``, 則將盡可能解析該路徑,並將任何剩餘部分追加到路徑"
902
+ "中,而不檢查其是否存在。 如果在解析過程中遇到無窮迴圈,則引發 :exc:"
903
+ "`RuntimeError`。"
870
904
871
905
#: ../../library/pathlib.rst:1130
872
906
msgid "The *strict* argument (pre-3.6 behavior is strict)."
873
- msgstr ""
907
+ msgstr "*strict* 引數(在 3.6 版本之前的行為是嚴格的)。 "
874
908
875
909
#: ../../library/pathlib.rst:1135
876
910
msgid ""
877
911
"This is like calling :func:`Path.glob` with \" ``**/``\" added in front of "
878
912
"the given relative *pattern*::"
879
913
msgstr ""
914
+ "這相當於在給定的相對 *pattern* 前面加上 \" ``**/``\" 並呼叫 :func:`Path.glob` "
915
+ ":\n"
916
+ "\n"
917
+ "::"
880
918
881
919
#: ../../library/pathlib.rst:1145
882
920
msgid ""
@@ -888,14 +926,17 @@ msgstr ""
888
926
889
927
#: ../../library/pathlib.rst:1153
890
928
msgid "Remove this directory. The directory must be empty."
891
- msgstr ""
929
+ msgstr "移除此目錄。該目錄必須為空。 "
892
930
893
931
#: ../../library/pathlib.rst:1158
894
932
msgid ""
895
933
"Return whether this path points to the same file as *other_path*, which can "
896
934
"be either a Path object, or a string. The semantics are similar to :func:"
897
935
"`os.path.samefile` and :func:`os.path.samestat`."
898
936
msgstr ""
937
+ "回傳是否此路徑指向與 *other_path* 相同的檔案,*other_path* 可以是路徑 (Path) "
938
+ "物件或字串。其語義類似於 :func:`os.path.samefile` 和 :func:`os.path."
939
+ "samestat`。"
899
940
900
941
#: ../../library/pathlib.rst:1162
901
942
msgid ""
0 commit comments