You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2906 lines
263 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <doc>
  3. <assembly>
  4. <name>System.IO.FileSystem</name>
  5. </assembly>
  6. <members>
  7. <member name="T:Microsoft.Win32.SafeHandles.SafeFileHandle">
  8. <summary>代表檔案控制代碼的包裝函式類別。</summary>
  9. </member>
  10. <member name="M:Microsoft.Win32.SafeHandles.SafeFileHandle.#ctor(System.IntPtr,System.Boolean)">
  11. <summary>初始化 <see cref="T:Microsoft.Win32.SafeHandles.SafeFileHandle" /> 類別的新執行個體。</summary>
  12. <param name="preexistingHandle">
  13. <see cref="T:System.IntPtr" /> 物件,表示要使用的既有控制代碼。</param>
  14. <param name="ownsHandle">true 表示在結束階段確實地釋放控制代碼,而 false 表示不要確實地釋放 (不建議)。</param>
  15. </member>
  16. <member name="P:Microsoft.Win32.SafeHandles.SafeFileHandle.IsInvalid"></member>
  17. <member name="T:System.IO.Directory">
  18. <summary>公開建立、移動和全面列舉目錄和子目錄的靜態方法。此類別無法被繼承。</summary>
  19. <filterpriority>1</filterpriority>
  20. </member>
  21. <member name="M:System.IO.Directory.CreateDirectory(System.String)">
  22. <summary>在指定的路徑建立所有目錄和子目錄 (如果這些目錄尚不存在)。</summary>
  23. <returns>表示指定路徑的目錄之物件。不論指定之路徑的目錄是否已經存在,都會傳回這個物件。</returns>
  24. <param name="path">要建立的目錄。</param>
  25. <exception cref="T:System.IO.IOException">
  26. <paramref name="path" /> 指定的目錄為檔案。-或-不知道網路名稱。</exception>
  27. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  28. <exception cref="T:System.ArgumentException">
  29. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。-或-<paramref name="path" /> 含有前置的冒號字元 (:),或僅含有冒號字元。</exception>
  30. <exception cref="T:System.ArgumentNullException">
  31. <paramref name="path" /> 為 null。</exception>
  32. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  33. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  34. <exception cref="T:System.NotSupportedException">
  35. <paramref name="path" /> 包含冒號字元 (:),此字元不屬於磁碟機標籤 ("C:\") 的一部分。</exception>
  36. <filterpriority>1</filterpriority>
  37. <PermissionSet>
  38. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  39. </PermissionSet>
  40. </member>
  41. <member name="M:System.IO.Directory.Delete(System.String)">
  42. <summary>從指定的路徑刪除空目錄。</summary>
  43. <param name="path">要移除的空目錄名稱。這個目錄必須為可寫入的和空的。</param>
  44. <exception cref="T:System.IO.IOException">具有 <paramref name="path" /> 所指定之相同名稱和位置的檔案已存在。-或-此目錄是應用程式目前的工作目錄。-或-<paramref name="path" /> 指定的目錄不是空的。-或-目錄是唯讀的或包含唯讀檔案。-或-目錄正由另一個處理序使用。-或-此目錄具有開啟控制代碼,而且作業系統是 Windows XP 或先前的版本。這個開放控制代碼可能是目錄所產生的結果。如需詳細資訊,請參閱如何:列舉目錄和檔案。</exception>
  45. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  46. <exception cref="T:System.ArgumentException">
  47. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。</exception>
  48. <exception cref="T:System.ArgumentNullException">
  49. <paramref name="path" /> 為 null。</exception>
  50. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  51. <exception cref="T:System.IO.DirectoryNotFoundException">
  52. <paramref name="path" /> 不存在或找不到。-或-<paramref name="path" /> 參考檔案,而不是目錄。-或-指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  53. <filterpriority>1</filterpriority>
  54. <PermissionSet>
  55. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  56. </PermissionSet>
  57. </member>
  58. <member name="M:System.IO.Directory.Delete(System.String,System.Boolean)">
  59. <summary>刪除指定目錄,並且若有指示的話,刪除目錄中的任何子目錄和檔案。</summary>
  60. <param name="path">要移除的目錄名稱。</param>
  61. <param name="recursive">若要移除 <paramref name="path" /> 中的目錄、子目錄和檔案,則為 true,否則為 false。</param>
  62. <exception cref="T:System.IO.IOException">具有 <paramref name="path" /> 所指定之相同名稱和位置的檔案已存在。-或-<paramref name="path" /> 所指定的目錄是唯讀的,或者 <paramref name="recursive" /> 是 false 而且 <paramref name="path" /> 是空目錄。-或-此目錄是應用程式目前的工作目錄。-或-目錄包含唯讀檔案。-或-目錄正由另一個處理序使用。此目錄或其中一個檔案具有開啟控制代碼,而且作業系統是 Windows XP 或先前的版本。這個開啟控制代碼可能是列舉目錄和檔案所產生。如需詳細資訊,請參閱如何:列舉目錄和檔案。</exception>
  63. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  64. <exception cref="T:System.ArgumentException">
  65. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。</exception>
  66. <exception cref="T:System.ArgumentNullException">
  67. <paramref name="path" /> 為 null。</exception>
  68. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  69. <exception cref="T:System.IO.DirectoryNotFoundException">
  70. <paramref name="path" /> 不存在或找不到。-或-<paramref name="path" /> 參考檔案,而不是目錄。-或-指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  71. <filterpriority>1</filterpriority>
  72. <PermissionSet>
  73. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  74. </PermissionSet>
  75. </member>
  76. <member name="M:System.IO.Directory.EnumerateDirectories(System.String)">
  77. <summary>傳回指定之路徑中目錄名稱的可列舉集合。</summary>
  78. <returns>
  79. <paramref name="path" /> 指定的目錄中,目錄完整名稱 (包括路徑) 的可列舉集合。</returns>
  80. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  81. <exception cref="T:System.ArgumentException">
  82. <paramref name="path " /> 是長度為零的字串,其中只包含泛空白字元,或包含無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。</exception>
  83. <exception cref="T:System.ArgumentNullException">
  84. <paramref name="path" /> 為 null。</exception>
  85. <exception cref="T:System.IO.DirectoryNotFoundException">
  86. <paramref name="path" /> 無效,例如參考未對應的磁碟機。</exception>
  87. <exception cref="T:System.IO.IOException">
  88. <paramref name="path" /> 為檔案名稱。</exception>
  89. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或組合都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  90. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的使用權限。</exception>
  91. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  92. </member>
  93. <member name="M:System.IO.Directory.EnumerateDirectories(System.String,System.String)">
  94. <summary>傳回指定之路徑中符合搜尋模式之目錄名稱的可列舉集合。</summary>
  95. <returns>
  96. <paramref name="path" /> 指定的目錄中,符合指定搜尋模式的目錄完整名稱 (包括路徑) 的可列舉集合。</returns>
  97. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  98. <param name="searchPattern">要比對 <paramref name="path" /> 中目錄名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  99. <exception cref="T:System.ArgumentException">
  100. <paramref name="path " /> 是長度為零的字串,其中只包含泛空白字元,或包含無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  101. <exception cref="T:System.ArgumentNullException">
  102. <paramref name="path" /> 為 null。-或-<paramref name="searchPattern" /> 為 null。</exception>
  103. <exception cref="T:System.IO.DirectoryNotFoundException">
  104. <paramref name="path" /> 無效,例如參考未對應的磁碟機。</exception>
  105. <exception cref="T:System.IO.IOException">
  106. <paramref name="path" /> 為檔案名稱。</exception>
  107. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或組合都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  108. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的使用權限。</exception>
  109. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  110. </member>
  111. <member name="M:System.IO.Directory.EnumerateDirectories(System.String,System.String,System.IO.SearchOption)">
  112. <summary>傳回指定之路徑中符合搜尋模式之目錄名稱的可列舉集合,並選擇性地搜尋子目錄。</summary>
  113. <returns>
  114. <paramref name="path" /> 指定的目錄中,符合指定搜尋模式和選項的目錄完整名稱 (包括路徑) 的可列舉集合。</returns>
  115. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  116. <param name="searchPattern">要比對 <paramref name="path" /> 中目錄名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  117. <param name="searchOption">其中一個列舉值,該值會指定搜尋作業應該只包含目前目錄還是包含所有子目錄。預設值是 <see cref="F:System.IO.SearchOption.TopDirectoryOnly" />。</param>
  118. <exception cref="T:System.ArgumentException">
  119. <paramref name="path " /> 是長度為零的字串,其中只包含泛空白字元,或包含無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  120. <exception cref="T:System.ArgumentNullException">
  121. <paramref name="path" /> 為 null。-或-<paramref name="searchPattern" /> 為 null。</exception>
  122. <exception cref="T:System.ArgumentOutOfRangeException">
  123. <paramref name="searchOption" /> 不是有效的 <see cref="T:System.IO.SearchOption" /> 值。</exception>
  124. <exception cref="T:System.IO.DirectoryNotFoundException">
  125. <paramref name="path" /> 無效,例如參考未對應的磁碟機。</exception>
  126. <exception cref="T:System.IO.IOException">
  127. <paramref name="path" /> 為檔案名稱。</exception>
  128. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或組合都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  129. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的使用權限。</exception>
  130. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  131. </member>
  132. <member name="M:System.IO.Directory.EnumerateFiles(System.String)">
  133. <summary>傳回指定之路徑中檔案名稱的可列舉集合。</summary>
  134. <returns>
  135. <paramref name="path" /> 指定的目錄中,檔案完整名稱 (包括路徑) 的可列舉集合。</returns>
  136. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  137. <exception cref="T:System.ArgumentException">
  138. <paramref name="path " /> 是長度為零的字串,其中只包含泛空白字元,或包含無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。</exception>
  139. <exception cref="T:System.ArgumentNullException">
  140. <paramref name="path" /> 為 null。</exception>
  141. <exception cref="T:System.IO.DirectoryNotFoundException">
  142. <paramref name="path" /> 無效,例如參考未對應的磁碟機。</exception>
  143. <exception cref="T:System.IO.IOException">
  144. <paramref name="path" /> 為檔案名稱。</exception>
  145. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或組合都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  146. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的使用權限。</exception>
  147. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  148. </member>
  149. <member name="M:System.IO.Directory.EnumerateFiles(System.String,System.String)">
  150. <summary>傳回指定之路徑中符合搜尋模式之檔名的可列舉集合。</summary>
  151. <returns>
  152. <paramref name="path" /> 指定的目錄中,符合指定搜尋模式的檔案完整名稱 (包括路徑) 的可列舉集合。</returns>
  153. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  154. <param name="searchPattern">要比對 <paramref name="path" /> 中檔案名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  155. <exception cref="T:System.ArgumentException">
  156. <paramref name="path " /> 是長度為零的字串,其中只包含泛空白字元,或包含無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  157. <exception cref="T:System.ArgumentNullException">
  158. <paramref name="path" /> 為 null。-或-<paramref name="searchPattern" /> 為 null。</exception>
  159. <exception cref="T:System.IO.DirectoryNotFoundException">
  160. <paramref name="path" /> 無效,例如參考未對應的磁碟機。</exception>
  161. <exception cref="T:System.IO.IOException">
  162. <paramref name="path" /> 為檔案名稱。</exception>
  163. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或組合都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  164. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的使用權限。</exception>
  165. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  166. </member>
  167. <member name="M:System.IO.Directory.EnumerateFiles(System.String,System.String,System.IO.SearchOption)">
  168. <summary>傳回指定之路徑中符合搜尋模式之檔名的可列舉集合,並選擇性地搜尋子目錄。</summary>
  169. <returns>
  170. <paramref name="path" /> 指定的目錄中,符合指定搜尋模式和選項的檔案完整名稱 (包括路徑) 的可列舉集合。</returns>
  171. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  172. <param name="searchPattern">要比對 <paramref name="path" /> 中檔案名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  173. <param name="searchOption">其中一個列舉值,該值會指定搜尋作業應該只包含目前目錄還是包含所有子目錄。預設值是 <see cref="F:System.IO.SearchOption.TopDirectoryOnly" />。</param>
  174. <exception cref="T:System.ArgumentException">
  175. <paramref name="path " /> 是長度為零的字串,其中只包含泛空白字元,或包含無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  176. <exception cref="T:System.ArgumentNullException">
  177. <paramref name="path" /> 為 null。-或-<paramref name="searchPattern" /> 為 null。</exception>
  178. <exception cref="T:System.ArgumentOutOfRangeException">
  179. <paramref name="searchOption" /> 不是有效的 <see cref="T:System.IO.SearchOption" /> 值。</exception>
  180. <exception cref="T:System.IO.DirectoryNotFoundException">
  181. <paramref name="path" /> 無效,例如參考未對應的磁碟機。</exception>
  182. <exception cref="T:System.IO.IOException">
  183. <paramref name="path" /> 為檔案名稱。</exception>
  184. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或組合都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  185. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的使用權限。</exception>
  186. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  187. </member>
  188. <member name="M:System.IO.Directory.EnumerateFileSystemEntries(System.String)">
  189. <summary>傳回指定之路徑中檔案名稱及目錄名稱的可列舉集合。</summary>
  190. <returns>
  191. <paramref name="path" /> 所指定目錄中檔案系統項目的可列舉集合。</returns>
  192. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  193. <exception cref="T:System.ArgumentException">
  194. <paramref name="path " /> 是長度為零的字串,其中只包含泛空白字元,或包含無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。</exception>
  195. <exception cref="T:System.ArgumentNullException">
  196. <paramref name="path" /> 為 null。</exception>
  197. <exception cref="T:System.IO.DirectoryNotFoundException">
  198. <paramref name="path" /> 無效,例如參考未對應的磁碟機。</exception>
  199. <exception cref="T:System.IO.IOException">
  200. <paramref name="path" /> 為檔案名稱。</exception>
  201. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或組合都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  202. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的使用權限。</exception>
  203. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  204. </member>
  205. <member name="M:System.IO.Directory.EnumerateFileSystemEntries(System.String,System.String)">
  206. <summary>傳回指定之路徑中符合搜尋模式之檔案名稱及目錄名稱的可列舉集合。</summary>
  207. <returns>
  208. <paramref name="path" /> 所指定目錄中指定搜尋模式的檔案系統項目的可列舉集合。</returns>
  209. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  210. <param name="searchPattern">要比對 <paramref name="path" /> 中檔案系統項目名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  211. <exception cref="T:System.ArgumentException">
  212. <paramref name="path " /> 是長度為零的字串,其中只包含泛空白字元,或包含無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  213. <exception cref="T:System.ArgumentNullException">
  214. <paramref name="path" /> 為 null。-或-<paramref name="searchPattern" /> 為 null。</exception>
  215. <exception cref="T:System.IO.DirectoryNotFoundException">
  216. <paramref name="path" /> 無效,例如參考未對應的磁碟機。</exception>
  217. <exception cref="T:System.IO.IOException">
  218. <paramref name="path" /> 為檔案名稱。</exception>
  219. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或組合都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  220. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的使用權限。</exception>
  221. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  222. </member>
  223. <member name="M:System.IO.Directory.EnumerateFileSystemEntries(System.String,System.String,System.IO.SearchOption)">
  224. <summary>傳回指定之路徑中符合搜尋模式之檔名和目錄名稱的可列舉集合,並選擇性地搜尋子目錄。</summary>
  225. <returns>
  226. <paramref name="path" /> 所指定目錄中指定搜尋模式和選項的檔案系統項目的可列舉集合。</returns>
  227. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  228. <param name="searchPattern">要比對 <paramref name="path" /> 中檔案系統項目的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  229. <param name="searchOption">其中一個列舉值,該值會指定搜尋作業應該只包含目前目錄還是包含所有子目錄。預設值是 <see cref="F:System.IO.SearchOption.TopDirectoryOnly" />。</param>
  230. <exception cref="T:System.ArgumentException">
  231. <paramref name="path " /> 是長度為零的字串,其中只包含泛空白字元,或包含無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  232. <exception cref="T:System.ArgumentNullException">
  233. <paramref name="path" /> 為 null。-或-<paramref name="searchPattern" /> 為 null。</exception>
  234. <exception cref="T:System.ArgumentOutOfRangeException">
  235. <paramref name="searchOption" /> 不是有效的 <see cref="T:System.IO.SearchOption" /> 值。</exception>
  236. <exception cref="T:System.IO.DirectoryNotFoundException">
  237. <paramref name="path" /> 無效,例如參考未對應的磁碟機。</exception>
  238. <exception cref="T:System.IO.IOException">
  239. <paramref name="path" /> 為檔案名稱。</exception>
  240. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或組合都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  241. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的使用權限。</exception>
  242. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  243. </member>
  244. <member name="M:System.IO.Directory.Exists(System.String)">
  245. <summary>判斷指定路徑是否參考磁碟上的現有目錄。</summary>
  246. <returns>如果 <paramref name="path" /> 參考現有的目錄,則為 true。如果目錄不存在,或嘗試判斷指定的檔案是否存在時發生錯誤,則為 false。如果 <paramref name="path" /> 參考現有目錄則為 true,否則為 false。</returns>
  247. <param name="path">要測試的路徑。</param>
  248. <filterpriority>1</filterpriority>
  249. <PermissionSet>
  250. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  251. </PermissionSet>
  252. </member>
  253. <member name="M:System.IO.Directory.GetCreationTime(System.String)">
  254. <summary>取得目錄的建立日期和時間。</summary>
  255. <returns>結構,設定為指定之目錄的建立日期和時間。這個值是以本地時間表示。</returns>
  256. <param name="path">目錄的路徑。</param>
  257. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  258. <exception cref="T:System.ArgumentException">
  259. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。</exception>
  260. <exception cref="T:System.ArgumentNullException">
  261. <paramref name="path" /> 為 null。</exception>
  262. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  263. <filterpriority>1</filterpriority>
  264. <PermissionSet>
  265. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  266. </PermissionSet>
  267. </member>
  268. <member name="M:System.IO.Directory.GetCreationTimeUtc(System.String)">
  269. <summary>取得目錄的建立日期和時間,格式為 Coordinated Universal Time (UTC)。</summary>
  270. <returns>結構,設定為指定之目錄的建立日期和時間。這個值是以 UTC 時間表示的。</returns>
  271. <param name="path">目錄的路徑。</param>
  272. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  273. <exception cref="T:System.ArgumentException">
  274. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。</exception>
  275. <exception cref="T:System.ArgumentNullException">
  276. <paramref name="path" /> 為 null。</exception>
  277. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  278. <filterpriority>2</filterpriority>
  279. <PermissionSet>
  280. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  281. </PermissionSet>
  282. </member>
  283. <member name="M:System.IO.Directory.GetCurrentDirectory">
  284. <summary>取得應用程式的目前工作目錄。</summary>
  285. <returns>含有目前工作目錄路徑且未以反斜線 (\) 結尾的字串。</returns>
  286. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  287. <exception cref="T:System.NotSupportedException">作業系統是沒有目前目錄功能的 Windows CE。這個方法在 .NET Compact Framework 中提供,但目前尚不支援。</exception>
  288. <filterpriority>1</filterpriority>
  289. <PermissionSet>
  290. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  291. </PermissionSet>
  292. </member>
  293. <member name="M:System.IO.Directory.GetDirectories(System.String)">
  294. <summary>傳回指定之目錄中的子目錄名稱 (包括其路徑)。</summary>
  295. <returns>指定之路徑中的子目錄完整名稱 (包括路徑) 陣列,如果找不到任何目錄則為空陣列。</returns>
  296. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  297. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  298. <exception cref="T:System.ArgumentException">
  299. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。</exception>
  300. <exception cref="T:System.ArgumentNullException">
  301. <paramref name="path" /> 為 null。</exception>
  302. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  303. <exception cref="T:System.IO.IOException">
  304. <paramref name="path" /> 為檔案名稱。</exception>
  305. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  306. <filterpriority>1</filterpriority>
  307. <PermissionSet>
  308. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  309. </PermissionSet>
  310. </member>
  311. <member name="M:System.IO.Directory.GetDirectories(System.String,System.String)">
  312. <summary>傳回指定目錄中符合指定搜尋模式的子目錄名稱 (包括檔案的路徑)。</summary>
  313. <returns>指定目錄中,符合搜尋模式的子目錄完整名稱 (包括路徑) 陣列,如果找不到任何目錄則為空陣列。</returns>
  314. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  315. <param name="searchPattern">要比對 <paramref name="path" /> 中子目錄名稱的搜尋字串。這個參數可以包含有效常值與萬用字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  316. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  317. <exception cref="T:System.ArgumentException">
  318. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" />,您可以查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  319. <exception cref="T:System.ArgumentNullException">
  320. <paramref name="path" /> 或 <paramref name="searchPattern" /> 是 null。</exception>
  321. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  322. <exception cref="T:System.IO.IOException">
  323. <paramref name="path" /> 為檔案名稱。</exception>
  324. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  325. <filterpriority>1</filterpriority>
  326. <PermissionSet>
  327. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  328. </PermissionSet>
  329. </member>
  330. <member name="M:System.IO.Directory.GetDirectories(System.String,System.String,System.IO.SearchOption)">
  331. <summary>傳回指定目錄中符合指定搜尋模式之子目錄 (包含其路徑) 的名稱,並且選擇性地搜尋子目錄。</summary>
  332. <returns>符合指定之準則的子目錄完整名稱 (包括路徑) 陣列,如果找不到任何目錄則為空陣列。</returns>
  333. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  334. <param name="searchPattern">要比對 <paramref name="path" /> 中子目錄名稱的搜尋字串。這個參數可以包含有效常值與萬用字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  335. <param name="searchOption">其中一個列舉值,這個值會指定搜尋作業應該包含所有子目錄或只包含目前目錄。</param>
  336. <exception cref="T:System.ArgumentException">
  337. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  338. <exception cref="T:System.ArgumentNullException">
  339. <paramref name="path" /> 或 <paramref name="searchPattern" /> 是 null。</exception>
  340. <exception cref="T:System.ArgumentOutOfRangeException">
  341. <paramref name="searchOption" /> 不是有效的 <see cref="T:System.IO.SearchOption" /> 值。</exception>
  342. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  343. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  344. <exception cref="T:System.IO.IOException">
  345. <paramref name="path" /> 為檔案名稱。</exception>
  346. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  347. </member>
  348. <member name="M:System.IO.Directory.GetDirectoryRoot(System.String)">
  349. <summary>傳回指定路徑的磁碟區資訊、根目錄資訊或兩者。</summary>
  350. <returns>含有指定路徑的磁碟區資訊、根目錄資訊或兩者的字串。</returns>
  351. <param name="path">檔案或目錄的路徑。</param>
  352. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  353. <exception cref="T:System.ArgumentException">
  354. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 來查詢無效的字元。</exception>
  355. <exception cref="T:System.ArgumentNullException">
  356. <paramref name="path" /> 為 null。</exception>
  357. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  358. <filterpriority>1</filterpriority>
  359. <PermissionSet>
  360. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  361. </PermissionSet>
  362. </member>
  363. <member name="M:System.IO.Directory.GetFiles(System.String)">
  364. <summary>傳回指定目錄中的檔案名稱 (包括路徑)。</summary>
  365. <returns>指定之目錄中的檔案完整名稱 (包括路徑) 陣列,如果找不到任何檔案則為空陣列。</returns>
  366. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  367. <exception cref="T:System.IO.IOException">
  368. <paramref name="path" /> 為檔案名稱。-或-發生網路錯誤。</exception>
  369. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  370. <exception cref="T:System.ArgumentException">
  371. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。</exception>
  372. <exception cref="T:System.ArgumentNullException">
  373. <paramref name="path" /> 為 null。</exception>
  374. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  375. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑找不到或無效 (例如,位於未對應的磁碟上)。</exception>
  376. <filterpriority>1</filterpriority>
  377. <PermissionSet>
  378. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  379. </PermissionSet>
  380. </member>
  381. <member name="M:System.IO.Directory.GetFiles(System.String,System.String)">
  382. <summary>傳回指定目錄中符合指定搜尋模式的檔案名稱 (包括檔案的路徑)。</summary>
  383. <returns>指定目錄中,符合指定搜尋模式的檔案完整名稱 (包括路徑) 陣列,如果找不到任何檔案則為空陣列。</returns>
  384. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  385. <param name="searchPattern">要比對 <paramref name="path" /> 中檔案名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  386. <exception cref="T:System.IO.IOException">
  387. <paramref name="path" /> 為檔案名稱。-或-發生網路錯誤。</exception>
  388. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  389. <exception cref="T:System.ArgumentException">
  390. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" />,您可以查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  391. <exception cref="T:System.ArgumentNullException">
  392. <paramref name="path" /> 或 <paramref name="searchPattern" /> 是 null。</exception>
  393. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  394. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑找不到或無效 (例如,位於未對應的磁碟上)。</exception>
  395. <filterpriority>1</filterpriority>
  396. <PermissionSet>
  397. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  398. </PermissionSet>
  399. </member>
  400. <member name="M:System.IO.Directory.GetFiles(System.String,System.String,System.IO.SearchOption)">
  401. <summary>傳回指定目錄中符合指定搜尋模式的檔案名稱 (包括檔案的路徑),並使用值判斷是否搜尋子目錄。</summary>
  402. <returns>指定目錄中,符合指定搜尋模式和選項的檔案完整名稱 (包括路徑) 陣列,如果找不到任何檔案則為空陣列。</returns>
  403. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  404. <param name="searchPattern">要比對 <paramref name="path" /> 中檔案名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  405. <param name="searchOption">其中一個列舉值,這個值會指定搜尋作業應該包含所有子目錄或只包含目前目錄。</param>
  406. <exception cref="T:System.ArgumentException">
  407. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  408. <exception cref="T:System.ArgumentNullException">
  409. <paramref name="path" /> 或 <paramref name="searchpattern" /> 是 null。</exception>
  410. <exception cref="T:System.ArgumentOutOfRangeException">
  411. <paramref name="searchOption" /> 不是有效的 <see cref="T:System.IO.SearchOption" /> 值。</exception>
  412. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  413. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑找不到或無效 (例如,位於未對應的磁碟上)。</exception>
  414. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  415. <exception cref="T:System.IO.IOException">
  416. <paramref name="path" /> 為檔案名稱。-或-發生網路錯誤。</exception>
  417. </member>
  418. <member name="M:System.IO.Directory.GetFileSystemEntries(System.String)">
  419. <summary>傳回指定路徑中所有檔案和子目錄的名稱。</summary>
  420. <returns>指定之目錄中的檔案及子目錄名稱陣列,如果找不到檔案或子目錄則為空陣列。</returns>
  421. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  422. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  423. <exception cref="T:System.ArgumentException">
  424. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 來查詢無效的字元。</exception>
  425. <exception cref="T:System.ArgumentNullException">
  426. <paramref name="path" /> 為 null。</exception>
  427. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  428. <exception cref="T:System.IO.IOException">
  429. <paramref name="path" /> 為檔案名稱。</exception>
  430. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  431. <filterpriority>1</filterpriority>
  432. <PermissionSet>
  433. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  434. </PermissionSet>
  435. </member>
  436. <member name="M:System.IO.Directory.GetFileSystemEntries(System.String,System.String)">
  437. <summary>傳回指定之路徑中符合搜尋模式之檔案名稱及目錄名稱陣列。</summary>
  438. <returns>符合指定搜尋條件的檔案名稱及目錄名稱陣列,如果找不到檔案或目錄則為空陣列。</returns>
  439. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  440. <param name="searchPattern">要比對 <paramref name="path" /> 中檔案及目錄名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  441. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  442. <exception cref="T:System.ArgumentException">
  443. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  444. <exception cref="T:System.ArgumentNullException">
  445. <paramref name="path" /> 或 <paramref name="searchPattern" /> 是 null。</exception>
  446. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  447. <exception cref="T:System.IO.IOException">
  448. <paramref name="path" /> 為檔案名稱。</exception>
  449. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  450. <filterpriority>1</filterpriority>
  451. <PermissionSet>
  452. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  453. </PermissionSet>
  454. </member>
  455. <member name="M:System.IO.Directory.GetFileSystemEntries(System.String,System.String,System.IO.SearchOption)">
  456. <summary>傳回指定之路徑中符合搜尋模式之所有檔名和目錄名稱的陣列,並選擇性地搜尋子目錄。</summary>
  457. <returns>檔案名稱及目錄名稱符合指定搜尋條件的檔案陣列,如果找不到檔案或目錄則為空陣列。</returns>
  458. <param name="path">要搜尋之目錄的相對或絕對路徑。這個字串不會區分大小寫。</param>
  459. <param name="searchPattern">要比對 <paramref name="path" /> 中檔案及目錄名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。</param>
  460. <param name="searchOption">其中一個列舉值,該值會指定搜尋作業應該只包含目前目錄還是包含所有子目錄。預設值是 <see cref="F:System.IO.SearchOption.TopDirectoryOnly" />。</param>
  461. <exception cref="T:System.ArgumentException">
  462. <paramref name="path " /> 是長度為零的字串,其中只包含泛空白字元,或包含無效的字元。使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法,您可以查詢無效的字元。-或-<paramref name="searchPattern" /> 不包含有效模式。</exception>
  463. <exception cref="T:System.ArgumentNullException">
  464. <paramref name="path" /> 為 null。-或-<paramref name="searchPattern" /> 為 null。</exception>
  465. <exception cref="T:System.ArgumentOutOfRangeException">
  466. <paramref name="searchOption" /> 不是有效的 <see cref="T:System.IO.SearchOption" /> 值。</exception>
  467. <exception cref="T:System.IO.DirectoryNotFoundException">
  468. <paramref name="path" /> 無效,例如參考未對應的磁碟機。</exception>
  469. <exception cref="T:System.IO.IOException">
  470. <paramref name="path" /> 為檔案名稱。</exception>
  471. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或組合都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  472. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的使用權限。</exception>
  473. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  474. </member>
  475. <member name="M:System.IO.Directory.GetLastAccessTime(System.String)">
  476. <summary>傳回指定檔案或目錄上次被存取的日期和時間。</summary>
  477. <returns>結構,設定為指定之檔案或目錄上次被存取的日期和時間。這個值是以本地時間表示。</returns>
  478. <param name="path">要取得其存取日期和時間資訊的檔案或目錄。</param>
  479. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  480. <exception cref="T:System.ArgumentException">
  481. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  482. <exception cref="T:System.ArgumentNullException">
  483. <paramref name="path" /> 為 null。</exception>
  484. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  485. <exception cref="T:System.NotSupportedException">
  486. <paramref name="path" /> 參數的格式無效。</exception>
  487. <filterpriority>1</filterpriority>
  488. <PermissionSet>
  489. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  490. </PermissionSet>
  491. </member>
  492. <member name="M:System.IO.Directory.GetLastAccessTimeUtc(System.String)">
  493. <summary>傳回上次存取指定檔案或目錄的日期和時間,格式為 Coordinated Universal Time (UTC)。</summary>
  494. <returns>結構,設定為指定之檔案或目錄上次被存取的日期和時間。這個值是以 UTC 時間表示的。</returns>
  495. <param name="path">要取得其存取日期和時間資訊的檔案或目錄。</param>
  496. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  497. <exception cref="T:System.ArgumentException">
  498. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  499. <exception cref="T:System.ArgumentNullException">
  500. <paramref name="path" /> 為 null。</exception>
  501. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  502. <exception cref="T:System.NotSupportedException">
  503. <paramref name="path" /> 參數的格式無效。</exception>
  504. <filterpriority>1</filterpriority>
  505. <PermissionSet>
  506. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  507. </PermissionSet>
  508. </member>
  509. <member name="M:System.IO.Directory.GetLastWriteTime(System.String)">
  510. <summary>傳回指定檔案或目錄上次被寫入的日期和時間。</summary>
  511. <returns>結構,設定為指定之檔案或目錄上次被寫入的日期和時間。這個值是以本地時間表示。</returns>
  512. <param name="path">要取得其修改日期和時間資訊的檔案或目錄。</param>
  513. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  514. <exception cref="T:System.ArgumentException">
  515. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  516. <exception cref="T:System.ArgumentNullException">
  517. <paramref name="path" /> 為 null。</exception>
  518. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  519. <filterpriority>1</filterpriority>
  520. <PermissionSet>
  521. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  522. </PermissionSet>
  523. </member>
  524. <member name="M:System.IO.Directory.GetLastWriteTimeUtc(System.String)">
  525. <summary>傳回上次寫入指定檔案或目錄的日期和時間,格式為 Coordinated Universal Time (UTC)。</summary>
  526. <returns>結構,設定為指定之檔案或目錄上次被寫入的日期和時間。這個值是以 UTC 時間表示的。</returns>
  527. <param name="path">要取得其修改日期和時間資訊的檔案或目錄。</param>
  528. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  529. <exception cref="T:System.ArgumentException">
  530. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  531. <exception cref="T:System.ArgumentNullException">
  532. <paramref name="path" /> 為 null。</exception>
  533. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  534. <filterpriority>2</filterpriority>
  535. <PermissionSet>
  536. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  537. </PermissionSet>
  538. </member>
  539. <member name="M:System.IO.Directory.GetParent(System.String)">
  540. <summary>擷取指定路徑的父目錄,包括絕對和相對路徑兩者。</summary>
  541. <returns>父目錄,或者為 null,如果 <paramref name="path" /> 是根目錄,包括 UNC 伺機器或共用名稱的根 (Root)。</returns>
  542. <param name="path">要擷取其父目錄的路徑。</param>
  543. <exception cref="T:System.IO.IOException">
  544. <paramref name="path" /> 指定的目錄為唯讀。</exception>
  545. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  546. <exception cref="T:System.ArgumentException">
  547. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  548. <exception cref="T:System.ArgumentNullException">
  549. <paramref name="path" /> 為 null。</exception>
  550. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  551. <exception cref="T:System.IO.DirectoryNotFoundException">找不到指定的路徑。</exception>
  552. <filterpriority>1</filterpriority>
  553. <PermissionSet>
  554. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  555. </PermissionSet>
  556. </member>
  557. <member name="M:System.IO.Directory.Move(System.String,System.String)">
  558. <summary>移動檔案或目錄和其內容到新位置。</summary>
  559. <param name="sourceDirName">要移動的檔案或目錄的路徑。</param>
  560. <param name="destDirName">
  561. <paramref name="sourceDirName" /> 的新位置的路徑。如果 <paramref name="sourceDirName" /> 是檔案,則 <paramref name="destDirName" /> 也必須是檔案名稱。</param>
  562. <exception cref="T:System.IO.IOException">已嘗試將目錄移動到不同磁碟區。-或-<paramref name="destDirName" /> 已存在。-或-<paramref name="sourceDirName" /> 和 <paramref name="destDirName" /> 參數參考到相同檔案或目錄。</exception>
  563. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  564. <exception cref="T:System.ArgumentException">
  565. <paramref name="sourceDirName" /> 或 <paramref name="destDirName" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  566. <exception cref="T:System.ArgumentNullException">
  567. <paramref name="sourceDirName" /> 或 <paramref name="destDirName" /> 是 null。</exception>
  568. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  569. <exception cref="T:System.IO.DirectoryNotFoundException">由 <paramref name="sourceDirName" /> 指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  570. <filterpriority>1</filterpriority>
  571. <PermissionSet>
  572. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  573. </PermissionSet>
  574. </member>
  575. <member name="M:System.IO.Directory.SetCreationTime(System.String,System.DateTime)">
  576. <summary>設定指定檔案或目錄建立的日期和時間。</summary>
  577. <param name="path">要設定其日期和時間資訊的檔案或目錄。</param>
  578. <param name="creationTime">上次寫入檔案或目錄的日期和時間。這個值是以本地時間表示。</param>
  579. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  580. <exception cref="T:System.ArgumentException">
  581. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  582. <exception cref="T:System.ArgumentNullException">
  583. <paramref name="path" /> 為 null。</exception>
  584. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  585. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  586. <exception cref="T:System.ArgumentOutOfRangeException">
  587. <paramref name="creationTime" /> 指定這個作業允許的日期或時間範圍以外的值。</exception>
  588. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  589. <filterpriority>1</filterpriority>
  590. <PermissionSet>
  591. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  592. </PermissionSet>
  593. </member>
  594. <member name="M:System.IO.Directory.SetCreationTimeUtc(System.String,System.DateTime)">
  595. <summary>設定指定檔案或目錄的建立日期和時間,格式為 Coordinated Universal Time (UTC)。</summary>
  596. <param name="path">要設定其日期和時間資訊的檔案或目錄。</param>
  597. <param name="creationTimeUtc">建立目錄或檔案的日期和時間。這個值是以本地時間表示。</param>
  598. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  599. <exception cref="T:System.ArgumentException">
  600. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  601. <exception cref="T:System.ArgumentNullException">
  602. <paramref name="path" /> 為 null。</exception>
  603. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  604. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  605. <exception cref="T:System.ArgumentOutOfRangeException">
  606. <paramref name="creationTime" /> 指定這個作業允許的日期或時間範圍以外的值。</exception>
  607. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  608. <filterpriority>2</filterpriority>
  609. <PermissionSet>
  610. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  611. </PermissionSet>
  612. </member>
  613. <member name="M:System.IO.Directory.SetCurrentDirectory(System.String)">
  614. <summary>將應用程式的目前工作目錄設定為指定目錄。</summary>
  615. <param name="path">設定為目前工作目錄的路徑。</param>
  616. <exception cref="T:System.IO.IOException">發生 I/O 錯誤。</exception>
  617. <exception cref="T:System.ArgumentException">
  618. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  619. <exception cref="T:System.ArgumentNullException">
  620. <paramref name="path" /> 為 null。</exception>
  621. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  622. <exception cref="T:System.Security.SecurityException">呼叫端沒有所需的使用權限來存取 Unmanaged 程式碼。</exception>
  623. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  624. <exception cref="T:System.IO.DirectoryNotFoundException">找不到指定的目錄。</exception>
  625. <filterpriority>1</filterpriority>
  626. <PermissionSet>
  627. <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
  628. </PermissionSet>
  629. </member>
  630. <member name="M:System.IO.Directory.SetLastAccessTime(System.String,System.DateTime)">
  631. <summary>設定指定檔案或目錄上次被存取的日期和時間。</summary>
  632. <param name="path">要設定其存取日期和時間資訊的檔案或目錄。</param>
  633. <param name="lastAccessTime">物件,含有要設定給 <paramref name="path" /> 的存取日期和時間的值。這個值是以本地時間表示。</param>
  634. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  635. <exception cref="T:System.ArgumentException">
  636. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  637. <exception cref="T:System.ArgumentNullException">
  638. <paramref name="path" /> 為 null。</exception>
  639. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  640. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  641. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  642. <exception cref="T:System.ArgumentOutOfRangeException">
  643. <paramref name="lastAccessTime" /> 指定這個作業允許的日期或時間範圍以外的值。</exception>
  644. <filterpriority>1</filterpriority>
  645. <PermissionSet>
  646. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  647. </PermissionSet>
  648. </member>
  649. <member name="M:System.IO.Directory.SetLastAccessTimeUtc(System.String,System.DateTime)">
  650. <summary>設定上次存取指定檔案或目錄的日期和時間,格式為 Coordinated Universal Time (UTC)。</summary>
  651. <param name="path">要設定其存取日期和時間資訊的檔案或目錄。</param>
  652. <param name="lastAccessTimeUtc">物件,含有要設定給 <paramref name="path" /> 的存取日期和時間的值。這個值是以 UTC 時間表示的。</param>
  653. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  654. <exception cref="T:System.ArgumentException">
  655. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  656. <exception cref="T:System.ArgumentNullException">
  657. <paramref name="path" /> 為 null。</exception>
  658. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  659. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  660. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  661. <exception cref="T:System.ArgumentOutOfRangeException">
  662. <paramref name="lastAccessTimeUtc" /> 指定這個作業允許的日期或時間範圍以外的值。</exception>
  663. <filterpriority>1</filterpriority>
  664. <PermissionSet>
  665. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  666. </PermissionSet>
  667. </member>
  668. <member name="M:System.IO.Directory.SetLastWriteTime(System.String,System.DateTime)">
  669. <summary>設定目錄上次被寫入的日期和時間。</summary>
  670. <param name="path">目錄的路徑。</param>
  671. <param name="lastWriteTime">目錄上次被寫入的日期和時間。這個值是以本地時間表示。</param>
  672. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  673. <exception cref="T:System.ArgumentException">
  674. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  675. <exception cref="T:System.ArgumentNullException">
  676. <paramref name="path" /> 為 null。</exception>
  677. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  678. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  679. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  680. <exception cref="T:System.ArgumentOutOfRangeException">
  681. <paramref name="lastWriteTime" /> 指定這個作業允許的日期或時間範圍以外的值。</exception>
  682. <filterpriority>1</filterpriority>
  683. <PermissionSet>
  684. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  685. </PermissionSet>
  686. </member>
  687. <member name="M:System.IO.Directory.SetLastWriteTimeUtc(System.String,System.DateTime)">
  688. <summary>設定上次寫入目錄的日期和時間,格式為 Coordinated Universal Time (UTC)。</summary>
  689. <param name="path">目錄的路徑。</param>
  690. <param name="lastWriteTimeUtc">目錄上次被寫入的日期和時間。這個值是以 UTC 時間表示的。</param>
  691. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  692. <exception cref="T:System.ArgumentException">
  693. <paramref name="path" /> 是長度為零的字串,其中只包含泛空白字元,或包含一個或多個無效的字元。您可以使用 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法來查詢無效的字元。</exception>
  694. <exception cref="T:System.ArgumentNullException">
  695. <paramref name="path" /> 為 null。</exception>
  696. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  697. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的使用權限。</exception>
  698. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  699. <exception cref="T:System.ArgumentOutOfRangeException">
  700. <paramref name="lastWriteTimeUtc" /> 指定這個作業允許的日期或時間範圍以外的值。</exception>
  701. <filterpriority>2</filterpriority>
  702. <PermissionSet>
  703. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  704. </PermissionSet>
  705. </member>
  706. <member name="T:System.IO.DirectoryInfo">
  707. <summary>公開建立、移動和全面列舉目錄和子目錄的執行個體 (Instance) 方法。此類別無法被繼承。若要瀏覽此類型的.NET Framework 原始碼,請參閱
  708. 參考來源.
  709. </summary>
  710. <filterpriority>1</filterpriority>
  711. </member>
  712. <member name="M:System.IO.DirectoryInfo.#ctor(System.String)">
  713. <summary>初始化
  714. <see cref="T:System.IO.DirectoryInfo" />類別上指定的路徑。
  715. </summary>
  716. <param name="path">字串,指定要在其中建立路徑
  717. DirectoryInfo.
  718. </param>
  719. <exception cref="T:System.ArgumentNullException">
  720. <paramref name="path" />是
  721. null.
  722. </exception>
  723. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  724. <exception cref="T:System.ArgumentException">
  725. <paramref name="path" /> 含有無效的字元,例如 "、&amp;lt;、&amp;gt; 或 |。
  726. </exception>
  727. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。指定的路徑、檔名,或是兩者都太長。</exception>
  728. </member>
  729. <member name="M:System.IO.DirectoryInfo.Create">
  730. <summary>建立目錄。</summary>
  731. <exception cref="T:System.IO.IOException">無法建立目錄</exception>
  732. <filterpriority>1</filterpriority>
  733. <PermissionSet>
  734. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  735. </PermissionSet>
  736. </member>
  737. <member name="M:System.IO.DirectoryInfo.CreateSubdirectory(System.String)">
  738. <summary>在指定路徑上建立子目錄。指定的路徑可以是相對的這個執行個體
  739. <see cref="T:System.IO.DirectoryInfo" />類別。
  740. </summary>
  741. <returns>在指定的最後一個目錄
  742. <paramref name="path" />.
  743. </returns>
  744. <param name="path">指定的路徑。不能是不同的磁碟區或通用命名慣例 (UNC) 名稱。</param>
  745. <exception cref="T:System.ArgumentException">
  746. <paramref name="path" />未指定有效的檔案路徑或包含不正確
  747. DirectoryInfo字元。
  748. </exception>
  749. <exception cref="T:System.ArgumentNullException">
  750. <paramref name="path" />是
  751. null.
  752. </exception>
  753. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  754. <exception cref="T:System.IO.IOException">無法建立子目錄-或-檔案或目錄已經具有所指定的名稱
  755. <paramref name="path" />.
  756. </exception>
  757. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。指定的路徑、檔名,或是兩者都太長。</exception>
  758. <exception cref="T:System.Security.SecurityException">呼叫端不具有建立目錄的程式碼存取權限。-或-呼叫端沒有程式碼存取權限讀取所傳回的目錄
  759. <see cref="T:System.IO.DirectoryInfo" /> 物件
  760. 這可能會發生時
  761. <paramref name="path" />參數描述現有的目錄。
  762. </exception>
  763. <exception cref="T:System.NotSupportedException">
  764. <paramref name="path" /> 包含冒號字元 (:),此字元不屬於磁碟機標籤 ("C:\") 的一部分。
  765. </exception>
  766. <filterpriority>2</filterpriority>
  767. <PermissionSet>
  768. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  769. </PermissionSet>
  770. </member>
  771. <member name="M:System.IO.DirectoryInfo.Delete">
  772. <summary>這會刪除
  773. <see cref="T:System.IO.DirectoryInfo" />如果它是空的。
  774. </summary>
  775. <exception cref="T:System.UnauthorizedAccessException">目錄包含唯讀檔案。</exception>
  776. <exception cref="T:System.IO.DirectoryNotFoundException">描述由這個目錄
  777. <see cref="T:System.IO.DirectoryInfo" />物件不存在或找不到。
  778. </exception>
  779. <exception cref="T:System.IO.IOException">目錄不是空的。-或-此目錄是應用程式目前的工作目錄。-或-此目錄具有開啟控制代碼,而且作業系統是 Windows XP 或先前的版本。這個開啟控制代碼可能是列舉目錄所產生的結果。如需詳細資訊,請參閱
  780. 如何:列舉目錄和檔案.
  781. </exception>
  782. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  783. <filterpriority>1</filterpriority>
  784. <PermissionSet>
  785. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  786. </PermissionSet>
  787. </member>
  788. <member name="M:System.IO.DirectoryInfo.Delete(System.Boolean)">
  789. <summary>刪除這個執行個體
  790. <see cref="T:System.IO.DirectoryInfo" />指定是否要刪除的子目錄和檔案。
  791. </summary>
  792. <param name="recursive">true若要刪除此目錄,及其子目錄中,所有的檔案 ;否則,
  793. false.
  794. </param>
  795. <exception cref="T:System.UnauthorizedAccessException">目錄包含唯讀檔案。</exception>
  796. <exception cref="T:System.IO.DirectoryNotFoundException">描述由這個目錄
  797. <see cref="T:System.IO.DirectoryInfo" />物件不存在或找不到。
  798. </exception>
  799. <exception cref="T:System.IO.IOException">目錄是唯讀的。-或-這個目錄包含一個或多個檔案或子目錄,
  800. <paramref name="recursive" />是
  801. false.
  802. -或-此目錄是應用程式目前的工作目錄。-或-此目錄或其中一個檔案具有開啟控制代碼,而且作業系統是 Windows XP 或先前的版本。這個開啟控制代碼可能是列舉目錄和檔案所產生。如需詳細資訊,請參閱
  803. 如何:列舉目錄和檔案.
  804. </exception>
  805. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  806. <filterpriority>1</filterpriority>
  807. <PermissionSet>
  808. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  809. </PermissionSet>
  810. </member>
  811. <member name="M:System.IO.DirectoryInfo.EnumerateDirectories">
  812. <summary>傳回目前目錄中目錄資訊的可列舉集合。</summary>
  813. <returns>目前目錄中目錄的可列舉集合。</returns>
  814. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  815. <see cref="T:System.IO.DirectoryInfo" />無效的物件 (例如,它是未對應的磁碟機上)。
  816. </exception>
  817. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  818. </member>
  819. <member name="M:System.IO.DirectoryInfo.EnumerateDirectories(System.String)">
  820. <summary>傳回符合指定之搜尋模式的目錄資訊的可列舉集合。</summary>
  821. <returns>比對之目錄的可列舉集合
  822. <paramref name="searchPattern" />.
  823. </returns>
  824. <param name="searchPattern">要比對目錄名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  825. <exception cref="T:System.ArgumentNullException">
  826. <paramref name="searchPattern" />是
  827. null.
  828. </exception>
  829. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  830. <see cref="T:System.IO.DirectoryInfo" />無效的物件 (例如,它是未對應的磁碟機上)。
  831. </exception>
  832. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  833. </member>
  834. <member name="M:System.IO.DirectoryInfo.EnumerateDirectories(System.String,System.IO.SearchOption)">
  835. <summary>傳回符合指定之搜尋模式和搜尋子目錄選項的目錄資訊的可列舉集合。</summary>
  836. <returns>比對之目錄的可列舉集合
  837. <paramref name="searchPattern" />和
  838. <paramref name="searchOption" />.
  839. </returns>
  840. <param name="searchPattern">要比對目錄名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  841. <param name="searchOption">其中一個列舉值,指定搜尋作業應該只包含目前目錄還是包含所有子目錄。預設值是
  842. <see cref="F:System.IO.SearchOption.TopDirectoryOnly" />.
  843. </param>
  844. <exception cref="T:System.ArgumentNullException">
  845. <paramref name="searchPattern" />是
  846. null.
  847. </exception>
  848. <exception cref="T:System.ArgumentOutOfRangeException">
  849. <paramref name="searchOption" />不是有效
  850. <see cref="T:System.IO.SearchOption" /> 值。
  851. </exception>
  852. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  853. <see cref="T:System.IO.DirectoryInfo" />無效的物件 (例如,它是未對應的磁碟機上)。
  854. </exception>
  855. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  856. </member>
  857. <member name="M:System.IO.DirectoryInfo.EnumerateFiles">
  858. <summary>傳回目前目錄中檔案資訊的可列舉集合。</summary>
  859. <returns>目前目錄中檔案的可列舉集合。</returns>
  860. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  861. <see cref="T:System.IO.DirectoryInfo" />無效的物件 (例如,它是未對應的磁碟機上)。
  862. </exception>
  863. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  864. </member>
  865. <member name="M:System.IO.DirectoryInfo.EnumerateFiles(System.String)">
  866. <summary>傳回符合指定之搜尋模式的檔案資訊的可列舉集合。</summary>
  867. <returns>符合檔案的可列舉集合
  868. <paramref name="searchPattern" />.
  869. </returns>
  870. <param name="searchPattern">要比對檔案名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  871. <exception cref="T:System.ArgumentNullException">
  872. <paramref name="searchPattern" />是
  873. null.
  874. </exception>
  875. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  876. <see cref="T:System.IO.DirectoryInfo" />無效的物件,(比方說,它是未對應的磁碟機上)。
  877. </exception>
  878. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  879. </member>
  880. <member name="M:System.IO.DirectoryInfo.EnumerateFiles(System.String,System.IO.SearchOption)">
  881. <summary>傳回符合指定之搜尋模式和搜尋子目錄選項的檔案資訊的可列舉集合。</summary>
  882. <returns>符合檔案的可列舉集合
  883. <paramref name="searchPattern" />和
  884. <paramref name="searchOption" />.
  885. </returns>
  886. <param name="searchPattern">要比對檔案名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  887. <param name="searchOption">其中一個列舉值,指定搜尋作業應該只包含目前目錄還是包含所有子目錄。預設值是
  888. <see cref="F:System.IO.SearchOption.TopDirectoryOnly" />.
  889. </param>
  890. <exception cref="T:System.ArgumentNullException">
  891. <paramref name="searchPattern" />是
  892. null.
  893. </exception>
  894. <exception cref="T:System.ArgumentOutOfRangeException">
  895. <paramref name="searchOption" />不是有效
  896. <see cref="T:System.IO.SearchOption" /> 值。
  897. </exception>
  898. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  899. <see cref="T:System.IO.DirectoryInfo" />無效的物件 (例如,它是未對應的磁碟機上)。
  900. </exception>
  901. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  902. </member>
  903. <member name="M:System.IO.DirectoryInfo.EnumerateFileSystemInfos">
  904. <summary>傳回目前目錄中檔案系統資訊的可列舉集合。</summary>
  905. <returns>目前目錄中檔案系統資訊的可列舉集合。</returns>
  906. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  907. <see cref="T:System.IO.DirectoryInfo" />無效的物件 (例如,它是未對應的磁碟機上)。
  908. </exception>
  909. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  910. </member>
  911. <member name="M:System.IO.DirectoryInfo.EnumerateFileSystemInfos(System.String)">
  912. <summary>傳回符合指定之搜尋模式的檔案系統資訊的可列舉集合。</summary>
  913. <returns>比對檔案系統資訊物件的可列舉集合
  914. <paramref name="searchPattern" />.
  915. </returns>
  916. <param name="searchPattern">要比對目錄名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  917. <exception cref="T:System.ArgumentNullException">
  918. <paramref name="searchPattern" />是
  919. null.
  920. </exception>
  921. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  922. <see cref="T:System.IO.DirectoryInfo" />無效的物件 (例如,它是未對應的磁碟機上)。
  923. </exception>
  924. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  925. </member>
  926. <member name="M:System.IO.DirectoryInfo.EnumerateFileSystemInfos(System.String,System.IO.SearchOption)">
  927. <summary>傳回符合指定之搜尋模式和搜尋子目錄選項的檔案系統資訊的可列舉集合。</summary>
  928. <returns>比對檔案系統資訊物件的可列舉集合
  929. <paramref name="searchPattern" />和
  930. <paramref name="searchOption" />.
  931. </returns>
  932. <param name="searchPattern">要比對目錄名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  933. <param name="searchOption">其中一個列舉值,指定搜尋作業應該只包含目前目錄還是包含所有子目錄。預設值是
  934. <see cref="F:System.IO.SearchOption.TopDirectoryOnly" />.
  935. </param>
  936. <exception cref="T:System.ArgumentNullException">
  937. <paramref name="searchPattern" />是
  938. null.
  939. </exception>
  940. <exception cref="T:System.ArgumentOutOfRangeException">
  941. <paramref name="searchOption" />不是有效
  942. <see cref="T:System.IO.SearchOption" /> 值。
  943. </exception>
  944. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  945. <see cref="T:System.IO.DirectoryInfo" />無效的物件 (例如,它是未對應的磁碟機上)。
  946. </exception>
  947. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  948. </member>
  949. <member name="P:System.IO.DirectoryInfo.Exists">
  950. <summary>取得值,指出目錄是否存在。</summary>
  951. <returns>true如果目錄存在 ;否則,
  952. false.
  953. </returns>
  954. <filterpriority>1</filterpriority>
  955. </member>
  956. <member name="M:System.IO.DirectoryInfo.GetDirectories">
  957. <summary>傳回目前目錄的子目錄。</summary>
  958. <returns>陣列
  959. <see cref="T:System.IO.DirectoryInfo" /> 物件。
  960. </returns>
  961. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  962. <see cref="T:System.IO.DirectoryInfo" />物件無效,例如未對應的磁碟上。
  963. </exception>
  964. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  965. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  966. <filterpriority>1</filterpriority>
  967. <PermissionSet>
  968. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  969. </PermissionSet>
  970. </member>
  971. <member name="M:System.IO.DirectoryInfo.GetDirectories(System.String)">
  972. <summary>傳回陣列中目前的目錄。
  973. <see cref="T:System.IO.DirectoryInfo" />比對給定的搜尋準則。
  974. </summary>
  975. <returns>型別的陣列
  976. DirectoryInfo比對
  977. <paramref name="searchPattern" />.
  978. </returns>
  979. <param name="searchPattern">要比對目錄名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  980. <exception cref="T:System.ArgumentException">
  981. <paramref name="searchPattern" />包含所定義的一個或多個無效的字元
  982. <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法。
  983. </exception>
  984. <exception cref="T:System.ArgumentNullException">
  985. <paramref name="searchPattern" />是
  986. null.
  987. </exception>
  988. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  989. DirectoryInfo無效的物件 (例如,它是未對應的磁碟機上)。
  990. </exception>
  991. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  992. <filterpriority>1</filterpriority>
  993. <PermissionSet>
  994. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  995. </PermissionSet>
  996. </member>
  997. <member name="M:System.IO.DirectoryInfo.GetDirectories(System.String,System.IO.SearchOption)">
  998. <summary>傳回陣列中目前的目錄。
  999. <see cref="T:System.IO.DirectoryInfo" />比對給定的搜尋準則,並使用值來決定是否要在搜尋子目錄。
  1000. </summary>
  1001. <returns>型別的陣列
  1002. DirectoryInfo比對
  1003. <paramref name="searchPattern" />.
  1004. </returns>
  1005. <param name="searchPattern">要比對目錄名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  1006. <param name="searchOption">其中一個列舉值,指定搜尋作業應該只包含目前目錄還是包含所有子目錄。</param>
  1007. <exception cref="T:System.ArgumentException">
  1008. <paramref name="searchPattern" />包含所定義的一個或多個無效的字元
  1009. <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法。
  1010. </exception>
  1011. <exception cref="T:System.ArgumentNullException">
  1012. <paramref name="searchPattern" />是
  1013. null.
  1014. </exception>
  1015. <exception cref="T:System.ArgumentOutOfRangeException">
  1016. <paramref name="searchOption" />不是有效
  1017. <see cref="T:System.IO.SearchOption" /> 值。
  1018. </exception>
  1019. <exception cref="T:System.IO.DirectoryNotFoundException">在封裝路徑
  1020. DirectoryInfo無效的物件 (例如,它是未對應的磁碟機上)。
  1021. </exception>
  1022. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1023. </member>
  1024. <member name="M:System.IO.DirectoryInfo.GetFiles">
  1025. <summary>從目前的目錄傳回檔案清單。</summary>
  1026. <returns>型別的陣列
  1027. <see cref="T:System.IO.FileInfo" />.
  1028. </returns>
  1029. <exception cref="T:System.IO.DirectoryNotFoundException">路徑無效,例如位在未對應的磁碟上。</exception>
  1030. <filterpriority>1</filterpriority>
  1031. <PermissionSet>
  1032. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1033. </PermissionSet>
  1034. </member>
  1035. <member name="M:System.IO.DirectoryInfo.GetFiles(System.String)">
  1036. <summary>從目前目錄傳回符合指定之搜尋模式的檔案清單。</summary>
  1037. <returns>型別的陣列
  1038. <see cref="T:System.IO.FileInfo" />.
  1039. </returns>
  1040. <param name="searchPattern">要比對檔案名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  1041. <exception cref="T:System.ArgumentException">
  1042. <paramref name="searchPattern" />包含所定義的一個或多個無效的字元
  1043. <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法。
  1044. </exception>
  1045. <exception cref="T:System.ArgumentNullException">
  1046. <paramref name="searchPattern" />是
  1047. null.
  1048. </exception>
  1049. <exception cref="T:System.IO.DirectoryNotFoundException">路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1050. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1051. <filterpriority>1</filterpriority>
  1052. <PermissionSet>
  1053. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1054. </PermissionSet>
  1055. </member>
  1056. <member name="M:System.IO.DirectoryInfo.GetFiles(System.String,System.IO.SearchOption)">
  1057. <summary>從目前目錄傳回符合指定搜尋模式的檔案清單,並使用值來判斷是否搜尋子目錄。</summary>
  1058. <returns>型別的陣列
  1059. <see cref="T:System.IO.FileInfo" />.
  1060. </returns>
  1061. <param name="searchPattern">要比對檔案名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  1062. <param name="searchOption">其中一個列舉值,指定搜尋作業應該只包含目前目錄還是包含所有子目錄。</param>
  1063. <exception cref="T:System.ArgumentException">
  1064. <paramref name="searchPattern" />包含所定義的一個或多個無效的字元
  1065. <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法。
  1066. </exception>
  1067. <exception cref="T:System.ArgumentNullException">
  1068. <paramref name="searchPattern" />是
  1069. null.
  1070. </exception>
  1071. <exception cref="T:System.ArgumentOutOfRangeException">
  1072. <paramref name="searchOption" />不是有效
  1073. <see cref="T:System.IO.SearchOption" /> 值。
  1074. </exception>
  1075. <exception cref="T:System.IO.DirectoryNotFoundException">路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1076. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1077. </member>
  1078. <member name="M:System.IO.DirectoryInfo.GetFileSystemInfos">
  1079. <summary>傳回陣列的強型別
  1080. <see cref="T:System.IO.FileSystemInfo" />表示所有檔案和子目錄的目錄中的項目。
  1081. </summary>
  1082. <returns>陣列的強型別
  1083. <see cref="T:System.IO.FileSystemInfo" />項目。
  1084. </returns>
  1085. <exception cref="T:System.IO.DirectoryNotFoundException">路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1086. <filterpriority>2</filterpriority>
  1087. <PermissionSet>
  1088. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1089. </PermissionSet>
  1090. </member>
  1091. <member name="M:System.IO.DirectoryInfo.GetFileSystemInfos(System.String)">
  1092. <summary>擷取陣列的強型別
  1093. <see cref="T:System.IO.FileSystemInfo" />物件代表的檔案與子目錄符合指定的搜尋準則。
  1094. </summary>
  1095. <returns>陣列的強型別
  1096. FileSystemInfo符合搜尋準則的物件。
  1097. </returns>
  1098. <param name="searchPattern">要比對目錄及檔案名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  1099. <exception cref="T:System.ArgumentException">
  1100. <paramref name="searchPattern" />包含所定義的一個或多個無效的字元
  1101. <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法。
  1102. </exception>
  1103. <exception cref="T:System.ArgumentNullException">
  1104. <paramref name="searchPattern" />是
  1105. null.
  1106. </exception>
  1107. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1108. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1109. <filterpriority>2</filterpriority>
  1110. <PermissionSet>
  1111. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1112. </PermissionSet>
  1113. </member>
  1114. <member name="M:System.IO.DirectoryInfo.GetFileSystemInfos(System.String,System.IO.SearchOption)">
  1115. <summary>擷取陣列
  1116. <see cref="T:System.IO.FileSystemInfo" />代表檔案和子目錄比對指定的搜尋準則的物件。
  1117. </summary>
  1118. <returns>陣列,包含符合搜尋準則的檔案系統項目。</returns>
  1119. <param name="searchPattern">要比對目錄及檔案名稱的搜尋字串。這個參數可以包含有效常值路徑與萬用 (* 和 ?) 字元 (請參閱<備註>) 的組合,但是不支援規則運算式。預設模式為 "*",這會傳回所有檔案。</param>
  1120. <param name="searchOption">其中一個列舉值,指定搜尋作業應該只包含目前目錄還是包含所有子目錄。預設值是
  1121. <see cref="F:System.IO.SearchOption.TopDirectoryOnly" />.
  1122. </param>
  1123. <exception cref="T:System.ArgumentException">
  1124. <paramref name="searchPattern" />包含所定義的一個或多個無效的字元
  1125. <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法。
  1126. </exception>
  1127. <exception cref="T:System.ArgumentNullException">
  1128. <paramref name="searchPattern" />是
  1129. null.
  1130. </exception>
  1131. <exception cref="T:System.ArgumentOutOfRangeException">
  1132. <paramref name="searchOption" />不是有效
  1133. <see cref="T:System.IO.SearchOption" /> 值。
  1134. </exception>
  1135. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1136. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1137. </member>
  1138. <member name="M:System.IO.DirectoryInfo.MoveTo(System.String)">
  1139. <summary>移動
  1140. <see cref="T:System.IO.DirectoryInfo" />執行個體,其內容,以新的路徑。
  1141. </summary>
  1142. <param name="destDirName">要將這個目錄移至的目的名稱和路徑。目的端不可以是另一個磁碟區,或者是名稱完全相同的目錄。它可以是您要將這個目錄加入做為子目錄的現有目錄。</param>
  1143. <exception cref="T:System.ArgumentNullException">
  1144. <paramref name="destDirName" />是
  1145. null.
  1146. </exception>
  1147. <exception cref="T:System.ArgumentException">
  1148. <paramref name="destDirName" /> 為空字串 ("")。
  1149. </exception>
  1150. <exception cref="T:System.IO.IOException">已嘗試將目錄移動到不同磁碟區。-或-<paramref name="destDirName" /> 已存在。
  1151. -或-您未取得存取此路徑的授權。-或-正在移動的目錄與目的目錄具有相同名稱。</exception>
  1152. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1153. <exception cref="T:System.IO.DirectoryNotFoundException">找不到目的目錄。</exception>
  1154. <filterpriority>1</filterpriority>
  1155. <PermissionSet>
  1156. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1157. </PermissionSet>
  1158. </member>
  1159. <member name="P:System.IO.DirectoryInfo.Name">
  1160. <summary>取得此名稱
  1161. <see cref="T:System.IO.DirectoryInfo" />執行個體。
  1162. </summary>
  1163. <returns>目錄名稱。</returns>
  1164. <filterpriority>1</filterpriority>
  1165. </member>
  1166. <member name="P:System.IO.DirectoryInfo.Parent">
  1167. <summary>取得指定子目錄的父代 (Parent) 目錄。</summary>
  1168. <returns>上層目錄中,或
  1169. null如果路徑為 null,或如果檔案路徑表示根 (例如"\"、"C:"或 *"\\server\share")。
  1170. </returns>
  1171. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1172. <filterpriority>1</filterpriority>
  1173. <PermissionSet>
  1174. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1175. </PermissionSet>
  1176. </member>
  1177. <member name="P:System.IO.DirectoryInfo.Root">
  1178. <summary>取得目錄的根目錄部分。</summary>
  1179. <returns>表示根目錄的物件。</returns>
  1180. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1181. <filterpriority>1</filterpriority>
  1182. <PermissionSet>
  1183. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1184. </PermissionSet>
  1185. </member>
  1186. <member name="M:System.IO.DirectoryInfo.ToString">
  1187. <summary>傳回已由使用者傳遞的原始路徑。</summary>
  1188. <returns>傳回已由使用者傳遞的原始路徑。</returns>
  1189. <filterpriority>2</filterpriority>
  1190. </member>
  1191. <member name="T:System.IO.File">
  1192. <summary>提供建立、複製、刪除、移動和開啟單一檔案的靜態方法,並協助 <see cref="T:System.IO.FileStream" /> 物件的建立。若要浏览此类型的.NET Framework 源代码,请参阅 Reference Source。</summary>
  1193. <filterpriority>1</filterpriority>
  1194. </member>
  1195. <member name="M:System.IO.File.AppendAllLines(System.String,System.Collections.Generic.IEnumerable{System.String})">
  1196. <summary>在檔案中加入幾行內容,然後關閉檔案。如果指定的檔案不存在,則這個方法會建立檔案,將指定的程式行寫入檔案,然後關閉檔案。</summary>
  1197. <param name="path">要在其中加入幾行內容的檔案。如果該檔案不存在,則會建立它。</param>
  1198. <param name="contents">要加入檔案的幾行內容。</param>
  1199. <exception cref="T:System.ArgumentException">
  1200. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法所定義的一個或多個無效字元。</exception>
  1201. <exception cref="T:System.ArgumentNullException">要么<paramref name=" path " />或 <paramref name="contents" /> 是 null。</exception>
  1202. <exception cref="T:System.IO.DirectoryNotFoundException">
  1203. <paramref name="path" /> 無效 (例如,目錄不存在或位於未對應的磁碟上)。</exception>
  1204. <exception cref="T:System.IO.FileNotFoundException">找不到 <paramref name="path" /> 所指定的檔案。</exception>
  1205. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1206. <exception cref="T:System.IO.PathTooLongException">
  1207. <paramref name="path" /> 超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  1208. <exception cref="T:System.NotSupportedException">
  1209. <paramref name="path" /> 的格式無效。</exception>
  1210. <exception cref="T:System.Security.SecurityException">呼叫端沒有寫入檔案的權限。</exception>
  1211. <exception cref="T:System.UnauthorizedAccessException">
  1212. <paramref name="path" /> 指定唯讀的檔案。-或-這個作業在目前平台不受支援。-或-<paramref name="path" /> 是目錄。</exception>
  1213. </member>
  1214. <member name="M:System.IO.File.AppendAllLines(System.String,System.Collections.Generic.IEnumerable{System.String},System.Text.Encoding)">
  1215. <summary>使用指定編碼將指定的幾行內容加入檔案,然後關閉檔案。如果指定的檔案不存在,則這個方法會建立檔案,將指定的程式行寫入檔案,然後關閉檔案。</summary>
  1216. <param name="path">要在其中加入幾行內容的檔案。如果該檔案不存在,則會建立它。</param>
  1217. <param name="contents">要加入檔案的幾行內容。</param>
  1218. <param name="encoding">要使用的字元編碼。</param>
  1219. <exception cref="T:System.ArgumentException">
  1220. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法所定義的一個或多個無效字元。</exception>
  1221. <exception cref="T:System.ArgumentNullException">
  1222. <paramref name=" path" />、 <paramref name="contents" /> 或 <paramref name="encoding" /> 為 null。</exception>
  1223. <exception cref="T:System.IO.DirectoryNotFoundException">
  1224. <paramref name="path" /> 無效 (例如,目錄不存在或位於未對應的磁碟上)。</exception>
  1225. <exception cref="T:System.IO.FileNotFoundException">找不到 <paramref name="path" /> 所指定的檔案。</exception>
  1226. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1227. <exception cref="T:System.IO.PathTooLongException">
  1228. <paramref name="path" /> 超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  1229. <exception cref="T:System.NotSupportedException">
  1230. <paramref name="path" /> 的格式無效。</exception>
  1231. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1232. <exception cref="T:System.UnauthorizedAccessException">
  1233. <paramref name="path" /> 指定唯讀的檔案。-或-這個作業在目前平台不受支援。-或-<paramref name="path" /> 是目錄。-或-呼叫端沒有必要的權限。</exception>
  1234. </member>
  1235. <member name="M:System.IO.File.AppendAllText(System.String,System.String)">
  1236. <summary>開啟檔案,將指定的字串附加至檔案,然後關閉檔案。如果檔案不存在,則這個方法會建立檔案,將指定的字串寫入檔案,然後關閉檔案。</summary>
  1237. <param name="path">要將指定字串附加至其中的檔案。</param>
  1238. <param name="contents">要附加至檔案的字串。</param>
  1239. <exception cref="T:System.ArgumentException">
  1240. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1241. <exception cref="T:System.ArgumentNullException">
  1242. <paramref name="path" /> 為 null。</exception>
  1243. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1244. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,目錄不存在或位於未對應的磁碟上)。</exception>
  1245. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1246. <exception cref="T:System.UnauthorizedAccessException">
  1247. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  1248. <exception cref="T:System.NotSupportedException">
  1249. <paramref name="path" /> 的格式無效。</exception>
  1250. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1251. <filterpriority>1</filterpriority>
  1252. <PermissionSet>
  1253. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1254. </PermissionSet>
  1255. </member>
  1256. <member name="M:System.IO.File.AppendAllText(System.String,System.String,System.Text.Encoding)">
  1257. <summary>將指定字串附加至檔案,如果檔案不存在,請建立一個新檔案。</summary>
  1258. <param name="path">要將指定字串附加至其中的檔案。</param>
  1259. <param name="contents">要附加至檔案的字串。</param>
  1260. <param name="encoding">要使用的字元編碼。</param>
  1261. <exception cref="T:System.ArgumentException">
  1262. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1263. <exception cref="T:System.ArgumentNullException">
  1264. <paramref name="path" /> 為 null。</exception>
  1265. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1266. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,目錄不存在或位於未對應的磁碟上)。</exception>
  1267. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1268. <exception cref="T:System.UnauthorizedAccessException">
  1269. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  1270. <exception cref="T:System.NotSupportedException">
  1271. <paramref name="path" /> 的格式無效。</exception>
  1272. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1273. <filterpriority>1</filterpriority>
  1274. <PermissionSet>
  1275. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1276. </PermissionSet>
  1277. </member>
  1278. <member name="M:System.IO.File.AppendText(System.String)">
  1279. <summary>建立會將 UTF-8 編碼的文字附加至現有檔案或新檔案 (如果指定的檔案不存在) 的 <see cref="T:System.IO.StreamWriter" />。</summary>
  1280. <returns>資料流寫入器,會附加 UTF-8 編碼的文字至指定的檔案或新檔案。</returns>
  1281. <param name="path">要附加至檔案的路徑。</param>
  1282. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1283. <exception cref="T:System.ArgumentException">
  1284. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1285. <exception cref="T:System.ArgumentNullException">
  1286. <paramref name="path" /> 為 null。</exception>
  1287. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1288. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,目錄不存在或位於未對應的磁碟上)。</exception>
  1289. <exception cref="T:System.NotSupportedException">
  1290. <paramref name="path" /> 的格式無效。</exception>
  1291. <filterpriority>1</filterpriority>
  1292. <PermissionSet>
  1293. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1294. </PermissionSet>
  1295. </member>
  1296. <member name="M:System.IO.File.Copy(System.String,System.String)">
  1297. <summary>複製現有的檔案到新的檔案。不允許覆寫相同名稱的檔案。</summary>
  1298. <param name="sourceFileName">要複製的檔案。</param>
  1299. <param name="destFileName">目的檔案的名稱。這不可以是目錄或現有檔案。</param>
  1300. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1301. <exception cref="T:System.ArgumentException">
  1302. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 是長度為零的字串、只含有泛空白字元,或含有一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。-或- <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 指定目錄。</exception>
  1303. <exception cref="T:System.ArgumentNullException">
  1304. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 為 null。</exception>
  1305. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1306. <exception cref="T:System.IO.DirectoryNotFoundException">
  1307. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 中指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1308. <exception cref="T:System.IO.FileNotFoundException">
  1309. <paramref name="sourceFileName" />。</exception>
  1310. <exception cref="T:System.IO.IOException">
  1311. <paramref name="destFileName" /> 存在。-或- 發生 I/O 錯誤。</exception>
  1312. <exception cref="T:System.NotSupportedException">
  1313. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 的格式無效。</exception>
  1314. <filterpriority>1</filterpriority>
  1315. <PermissionSet>
  1316. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1317. </PermissionSet>
  1318. </member>
  1319. <member name="M:System.IO.File.Copy(System.String,System.String,System.Boolean)">
  1320. <summary>複製現有的檔案到新的檔案。允許覆寫相同名稱的檔案。</summary>
  1321. <param name="sourceFileName">要複製的檔案。</param>
  1322. <param name="destFileName">目的檔案的名稱。這不可以是目錄。</param>
  1323. <param name="overwrite">如果可以覆寫目的檔案,則為 true,否則為 false。</param>
  1324. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。-或-<paramref name="destFileName" /> 是唯讀的。</exception>
  1325. <exception cref="T:System.ArgumentException">
  1326. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 是長度為零的字串、只含有泛空白字元,或含有一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。-或- <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 指定目錄。</exception>
  1327. <exception cref="T:System.ArgumentNullException">
  1328. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 為 null。</exception>
  1329. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1330. <exception cref="T:System.IO.DirectoryNotFoundException">
  1331. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 中指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1332. <exception cref="T:System.IO.FileNotFoundException">
  1333. <paramref name="sourceFileName" />。</exception>
  1334. <exception cref="T:System.IO.IOException">
  1335. <paramref name="destFileName" /> 存在,而且 <paramref name="overwrite" /> 是 false。-或- 發生 I/O 錯誤。</exception>
  1336. <exception cref="T:System.NotSupportedException">
  1337. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 的格式無效。</exception>
  1338. <filterpriority>1</filterpriority>
  1339. <PermissionSet>
  1340. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1341. </PermissionSet>
  1342. </member>
  1343. <member name="M:System.IO.File.Create(System.String)">
  1344. <summary>在指定的路徑中建立或覆寫檔案。</summary>
  1345. <returns>
  1346. <see cref="T:System.IO.FileStream" />,提供在 <paramref name="path" /> 中指定之檔案的讀取/寫入存取。</returns>
  1347. <param name="path">要建立的檔案路徑和名稱。</param>
  1348. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。-或- <paramref name="path" /> 指定了唯讀的檔案。</exception>
  1349. <exception cref="T:System.ArgumentException">
  1350. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1351. <exception cref="T:System.ArgumentNullException">
  1352. <paramref name="path" /> 為 null。</exception>
  1353. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1354. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1355. <exception cref="T:System.IO.IOException">建立檔案時發生 I/O 錯誤。</exception>
  1356. <exception cref="T:System.NotSupportedException">
  1357. <paramref name="path" /> 的格式無效。</exception>
  1358. <filterpriority>1</filterpriority>
  1359. <PermissionSet>
  1360. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1361. </PermissionSet>
  1362. </member>
  1363. <member name="M:System.IO.File.Create(System.String,System.Int32)">
  1364. <summary>建立或覆寫指定檔案。</summary>
  1365. <returns>具有指定之緩衝區大小的 <see cref="T:System.IO.FileStream" />,提供在 <paramref name="path" /> 中指定之檔案的讀取/寫入存取。</returns>
  1366. <param name="path">檔案的檔名。</param>
  1367. <param name="bufferSize">用來緩衝檔案的讀取和寫入的位元組數。</param>
  1368. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。-或- <paramref name="path" /> 指定了唯讀的檔案。</exception>
  1369. <exception cref="T:System.ArgumentException">
  1370. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1371. <exception cref="T:System.ArgumentNullException">
  1372. <paramref name="path" /> 為 null。</exception>
  1373. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1374. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1375. <exception cref="T:System.IO.IOException">建立檔案時發生 I/O 錯誤。</exception>
  1376. <exception cref="T:System.NotSupportedException">
  1377. <paramref name="path" /> 的格式無效。</exception>
  1378. <filterpriority>1</filterpriority>
  1379. <PermissionSet>
  1380. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1381. </PermissionSet>
  1382. </member>
  1383. <member name="M:System.IO.File.Create(System.String,System.Int32,System.IO.FileOptions)">
  1384. <summary>建立或覆寫指定檔案,並指定緩衝區大小以及描述如何建立或覆寫檔案的 <see cref="T:System.IO.FileOptions" /> 值。</summary>
  1385. <returns>具有指定緩衝區大小的新檔案。</returns>
  1386. <param name="path">檔案的檔名。</param>
  1387. <param name="bufferSize">用來緩衝檔案的讀取和寫入的位元組數。</param>
  1388. <param name="options">其中一個 <see cref="T:System.IO.FileOptions" /> 值,描述如何建立或覆寫檔案。</param>
  1389. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。-或- <paramref name="path" /> 指定了唯讀的檔案。-或-<see cref="F:System.IO.FileOptions.Encrypted" /> 是指定給 <paramref name="options" />,且目前平台上不支援檔案加密。</exception>
  1390. <exception cref="T:System.ArgumentException">
  1391. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1392. <exception cref="T:System.ArgumentNullException">
  1393. <paramref name="path" /> 為 null。</exception>
  1394. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1395. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1396. <exception cref="T:System.IO.IOException">建立檔案時發生 I/O 錯誤。</exception>
  1397. <exception cref="T:System.NotSupportedException">
  1398. <paramref name="path" /> 的格式無效。</exception>
  1399. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。-或- <paramref name="path" /> 指定了唯讀的檔案。</exception>
  1400. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。-或- <paramref name="path" /> 指定了唯讀的檔案。</exception>
  1401. </member>
  1402. <member name="M:System.IO.File.CreateText(System.String)">
  1403. <summary>建立或開啟用以寫入 UTF-8 編碼文字的檔案。</summary>
  1404. <returns>
  1405. <see cref="T:System.IO.StreamWriter" />,使用 UTF-8 編碼方式寫入指定檔案。</returns>
  1406. <param name="path">要被開啟來寫入的檔案。</param>
  1407. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1408. <exception cref="T:System.ArgumentException">
  1409. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1410. <exception cref="T:System.ArgumentNullException">
  1411. <paramref name="path" /> 為 null。</exception>
  1412. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1413. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1414. <exception cref="T:System.NotSupportedException">
  1415. <paramref name="path" /> 的格式無效。</exception>
  1416. <filterpriority>1</filterpriority>
  1417. <PermissionSet>
  1418. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1419. </PermissionSet>
  1420. </member>
  1421. <member name="M:System.IO.File.Delete(System.String)">
  1422. <summary>刪除指定的檔案。</summary>
  1423. <param name="path">要刪除的檔案的名稱。不支援萬用字元。</param>
  1424. <exception cref="T:System.ArgumentException">
  1425. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1426. <exception cref="T:System.ArgumentNullException">
  1427. <paramref name="path" /> 為 null。</exception>
  1428. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1429. <exception cref="T:System.IO.IOException">指定檔案在使用中。-或-此檔案具有開啟控制代碼,而且作業系統是 Windows XP 或先前的版本。這個開啟控制代碼可能是列舉目錄和檔案所產生。如需詳細資訊,請參閱如何:列舉目錄和檔案。</exception>
  1430. <exception cref="T:System.NotSupportedException">
  1431. <paramref name="path" /> 的格式無效。</exception>
  1432. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1433. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。-或- 该文件是正在使用的可执行文件。-或- <paramref name="path" /> 是目錄。-或- <paramref name="path" /> 指定了唯讀的檔案。</exception>
  1434. <filterpriority>1</filterpriority>
  1435. <PermissionSet>
  1436. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1437. </PermissionSet>
  1438. </member>
  1439. <member name="M:System.IO.File.Exists(System.String)">
  1440. <summary>判斷指定的檔案是否存在。</summary>
  1441. <returns>如果呼叫端具有必要的權限,而且 true 包含現有檔案的名稱,則為 <paramref name="path" />,否則為 false。如果 false 是 <paramref name="path" />、無效路徑或長度為零的字串,這個方法也會傳回 null。如果呼叫端沒有充足權限讀取指定檔案,沒有例外狀況會擲回,並且不論 false 是否存在,方法都會傳回 <paramref name="path" />。</returns>
  1442. <param name="path">要檢查的檔案。</param>
  1443. <filterpriority>1</filterpriority>
  1444. <PermissionSet>
  1445. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1446. </PermissionSet>
  1447. </member>
  1448. <member name="M:System.IO.File.GetAttributes(System.String)">
  1449. <summary>取得路徑上檔案的 <see cref="T:System.IO.FileAttributes" />。</summary>
  1450. <returns>路徑上檔案的 <see cref="T:System.IO.FileAttributes" />。</returns>
  1451. <param name="path">檔案的路徑。</param>
  1452. <exception cref="T:System.ArgumentException">
  1453. <paramref name="path" /> 是空的,只含有泛空白字元,或者含有無效的字元。</exception>
  1454. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1455. <exception cref="T:System.NotSupportedException">
  1456. <paramref name="path" /> 的格式無效。</exception>
  1457. <exception cref="T:System.IO.FileNotFoundException">
  1458. <paramref name="path" /> 表示檔案而且無效,例如,位於未對應的磁碟上,或找不到檔案。</exception>
  1459. <exception cref="T:System.IO.DirectoryNotFoundException">
  1460. <paramref name="path" /> 表示目錄而且無效,例如,位於未對應的磁碟上,或找不到目錄。</exception>
  1461. <exception cref="T:System.IO.IOException">這個檔案正由另一個處理序使用。</exception>
  1462. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1463. <filterpriority>1</filterpriority>
  1464. <PermissionSet>
  1465. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1466. </PermissionSet>
  1467. </member>
  1468. <member name="M:System.IO.File.GetCreationTime(System.String)">
  1469. <summary>傳回指定檔案或目錄的建立日期和時間。</summary>
  1470. <returns>
  1471. <see cref="T:System.DateTime" /> 結構,設定為指定檔案或目錄的建立日期和時間。這個值以本地時間表示。</returns>
  1472. <param name="path">要取得其建立日期和時間資訊的檔案或目錄。</param>
  1473. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1474. <exception cref="T:System.ArgumentException">
  1475. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1476. <exception cref="T:System.ArgumentNullException">
  1477. <paramref name="path" /> 為 null。</exception>
  1478. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1479. <exception cref="T:System.NotSupportedException">
  1480. <paramref name="path" /> 的格式無效。</exception>
  1481. <filterpriority>1</filterpriority>
  1482. <PermissionSet>
  1483. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1484. </PermissionSet>
  1485. </member>
  1486. <member name="M:System.IO.File.GetCreationTimeUtc(System.String)">
  1487. <summary>傳回指定檔案或目錄的建立日期和時間,格式為國際標準時間 (UTC)。</summary>
  1488. <returns>
  1489. <see cref="T:System.DateTime" /> 結構,設定為指定檔案或目錄的建立日期和時間。這個值以 UTC 時間表示。</returns>
  1490. <param name="path">要取得其建立日期和時間資訊的檔案或目錄。</param>
  1491. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1492. <exception cref="T:System.ArgumentException">
  1493. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1494. <exception cref="T:System.ArgumentNullException">
  1495. <paramref name="path" /> 為 null。</exception>
  1496. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1497. <exception cref="T:System.NotSupportedException">
  1498. <paramref name="path" /> 的格式無效。</exception>
  1499. <filterpriority>2</filterpriority>
  1500. <PermissionSet>
  1501. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1502. </PermissionSet>
  1503. </member>
  1504. <member name="M:System.IO.File.GetLastAccessTime(System.String)">
  1505. <summary>傳回指定檔案或目錄上次被存取的日期和時間。</summary>
  1506. <returns>
  1507. <see cref="T:System.DateTime" /> 結構,設定為指定檔案或目錄的上次存取日期和時間。這個值以本地時間表示。</returns>
  1508. <param name="path">要取得其存取日期和時間資訊的檔案或目錄。</param>
  1509. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1510. <exception cref="T:System.ArgumentException">
  1511. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1512. <exception cref="T:System.ArgumentNullException">
  1513. <paramref name="path" /> 為 null。</exception>
  1514. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1515. <exception cref="T:System.NotSupportedException">
  1516. <paramref name="path" /> 的格式無效。</exception>
  1517. <filterpriority>1</filterpriority>
  1518. <PermissionSet>
  1519. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1520. </PermissionSet>
  1521. </member>
  1522. <member name="M:System.IO.File.GetLastAccessTimeUtc(System.String)">
  1523. <summary>傳回指定檔案或目錄上次被存取的日期和時間,格式為國際標準時間 (UTC)。</summary>
  1524. <returns>
  1525. <see cref="T:System.DateTime" /> 結構,設定為指定檔案或目錄的上次存取日期和時間。這個值以 UTC 時間表示。</returns>
  1526. <param name="path">要取得其存取日期和時間資訊的檔案或目錄。</param>
  1527. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1528. <exception cref="T:System.ArgumentException">
  1529. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1530. <exception cref="T:System.ArgumentNullException">
  1531. <paramref name="path" /> 為 null。</exception>
  1532. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1533. <exception cref="T:System.NotSupportedException">
  1534. <paramref name="path" /> 的格式無效。</exception>
  1535. <filterpriority>1</filterpriority>
  1536. <PermissionSet>
  1537. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1538. </PermissionSet>
  1539. </member>
  1540. <member name="M:System.IO.File.GetLastWriteTime(System.String)">
  1541. <summary>傳回指定檔案或目錄上次被寫入的日期和時間。</summary>
  1542. <returns>
  1543. <see cref="T:System.DateTime" /> 結構,設定為指定檔案或目錄的上次寫入日期和時間。這個值以本地時間表示。</returns>
  1544. <param name="path">要取得其寫入日期和時間資訊的檔案或目錄。</param>
  1545. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1546. <exception cref="T:System.ArgumentException">
  1547. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1548. <exception cref="T:System.ArgumentNullException">
  1549. <paramref name="path" /> 為 null。</exception>
  1550. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1551. <exception cref="T:System.NotSupportedException">
  1552. <paramref name="path" /> 的格式無效。</exception>
  1553. <filterpriority>1</filterpriority>
  1554. <PermissionSet>
  1555. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1556. </PermissionSet>
  1557. </member>
  1558. <member name="M:System.IO.File.GetLastWriteTimeUtc(System.String)">
  1559. <summary>傳回指定檔案或目錄上次被寫入的日期和時間,格式為國際標準時間 (UTC)。</summary>
  1560. <returns>
  1561. <see cref="T:System.DateTime" /> 結構,設定為指定檔案或目錄的上次寫入日期和時間。這個值以 UTC 時間表示。</returns>
  1562. <param name="path">要取得其寫入日期和時間資訊的檔案或目錄。</param>
  1563. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1564. <exception cref="T:System.ArgumentException">
  1565. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1566. <exception cref="T:System.ArgumentNullException">
  1567. <paramref name="path" /> 為 null。</exception>
  1568. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1569. <exception cref="T:System.NotSupportedException">
  1570. <paramref name="path" /> 的格式無效。</exception>
  1571. <filterpriority>2</filterpriority>
  1572. <PermissionSet>
  1573. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1574. </PermissionSet>
  1575. </member>
  1576. <member name="M:System.IO.File.Move(System.String,System.String)">
  1577. <summary>移動指定的檔案至新的位置,提供指定新檔名的選項。</summary>
  1578. <param name="sourceFileName">要移動的檔案名稱。可包含相對或絕對路徑。</param>
  1579. <param name="destFileName">檔案的新路徑和名稱。</param>
  1580. <exception cref="T:System.IO.IOException">目的檔案已經存在。-或-<paramref name="sourceFileName" />。</exception>
  1581. <exception cref="T:System.ArgumentNullException">
  1582. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 為 null。</exception>
  1583. <exception cref="T:System.ArgumentException">
  1584. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 是長度為零的字串、只含有泛空白字元,或含有一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1585. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1586. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1587. <exception cref="T:System.IO.DirectoryNotFoundException">
  1588. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 中指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1589. <exception cref="T:System.NotSupportedException">
  1590. <paramref name="sourceFileName" /> 或 <paramref name="destFileName" /> 的格式無效。</exception>
  1591. <filterpriority>1</filterpriority>
  1592. <PermissionSet>
  1593. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1594. </PermissionSet>
  1595. </member>
  1596. <member name="M:System.IO.File.Open(System.String,System.IO.FileMode)">
  1597. <summary>在指定路徑上以讀取/寫入存取來開啟 <see cref="T:System.IO.FileStream" />。</summary>
  1598. <returns>在指定模式和路徑中開啟的 <see cref="T:System.IO.FileStream" />,具有讀取/寫入存取而且不共用。</returns>
  1599. <param name="path">要開啟的檔案。</param>
  1600. <param name="mode">
  1601. <see cref="T:System.IO.FileMode" /> 值,指定是否要建立檔案 (如果不存在的話),以及決定要保留或覆寫現有檔案的內容。</param>
  1602. <exception cref="T:System.ArgumentException">
  1603. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1604. <exception cref="T:System.ArgumentNullException">
  1605. <paramref name="path" /> 為 null。</exception>
  1606. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1607. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1608. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1609. <exception cref="T:System.UnauthorizedAccessException">
  1610. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。-或-<paramref name="mode" /> 是 <see cref="F:System.IO.FileMode.Create" />,且指定的檔案是隱藏檔案。</exception>
  1611. <exception cref="T:System.ArgumentOutOfRangeException">
  1612. <paramref name="mode" /> 指定了無效值。</exception>
  1613. <exception cref="T:System.IO.FileNotFoundException">找不到在 <paramref name="path" /> 中指定的檔案。</exception>
  1614. <exception cref="T:System.NotSupportedException">
  1615. <paramref name="path" /> 的格式無效。</exception>
  1616. <filterpriority>1</filterpriority>
  1617. <PermissionSet>
  1618. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1619. </PermissionSet>
  1620. </member>
  1621. <member name="M:System.IO.File.Open(System.String,System.IO.FileMode,System.IO.FileAccess)">
  1622. <summary>在指定路徑上以指定模式和存取來開啟 <see cref="T:System.IO.FileStream" />。</summary>
  1623. <returns>不共用的 <see cref="T:System.IO.FileStream" />,提供對指定檔案 (具有指定模式和存取) 的存取。</returns>
  1624. <param name="path">要開啟的檔案。</param>
  1625. <param name="mode">
  1626. <see cref="T:System.IO.FileMode" /> 值,指定是否要建立檔案 (如果不存在的話),以及決定要保留或覆寫現有檔案的內容。</param>
  1627. <param name="access">
  1628. <see cref="T:System.IO.FileAccess" /> 值,指定可以在檔案上執行的作業。</param>
  1629. <exception cref="T:System.ArgumentException">
  1630. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。-或- <paramref name="access" /> 指定為 Read,並且 <paramref name="mode" /> 指定為 Create、CreateNew、Truncate 或 Append。</exception>
  1631. <exception cref="T:System.ArgumentNullException">
  1632. <paramref name="path" /> 為 null。</exception>
  1633. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1634. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1635. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1636. <exception cref="T:System.UnauthorizedAccessException">
  1637. <paramref name="path" /> 指定為唯讀的檔案,而且 <paramref name="access" /> 不是 Read。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。-或-<paramref name="mode" /> 是 <see cref="F:System.IO.FileMode.Create" />,且指定的檔案是隱藏檔案。</exception>
  1638. <exception cref="T:System.ArgumentOutOfRangeException">
  1639. <paramref name="mode" /> 或 <paramref name="access" /> 指定了無效值。</exception>
  1640. <exception cref="T:System.IO.FileNotFoundException">找不到在 <paramref name="path" /> 中指定的檔案。</exception>
  1641. <exception cref="T:System.NotSupportedException">
  1642. <paramref name="path" /> 的格式無效。</exception>
  1643. <filterpriority>1</filterpriority>
  1644. <PermissionSet>
  1645. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1646. </PermissionSet>
  1647. </member>
  1648. <member name="M:System.IO.File.Open(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)">
  1649. <summary>在指定路徑上開啟 <see cref="T:System.IO.FileStream" />,假定它具有讀取、寫入或讀取/寫入存取的指定模式和指定的共用選項。</summary>
  1650. <returns>指定路徑上的 <see cref="T:System.IO.FileStream" />,假定它具有讀取、寫入或讀取/寫入存取的指定模式和指定的共用選項。</returns>
  1651. <param name="path">要開啟的檔案。</param>
  1652. <param name="mode">
  1653. <see cref="T:System.IO.FileMode" /> 值,指定是否要建立檔案 (如果不存在的話),以及決定要保留或覆寫現有檔案的內容。</param>
  1654. <param name="access">
  1655. <see cref="T:System.IO.FileAccess" /> 值,指定可以在檔案上執行的作業。</param>
  1656. <param name="share">
  1657. <see cref="T:System.IO.FileShare" /> 值,指定其他執行緒對檔案擁有的存取類型。</param>
  1658. <exception cref="T:System.ArgumentException">
  1659. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。-或- <paramref name="access" /> 指定為 Read,並且 <paramref name="mode" /> 指定為 Create、CreateNew、Truncate 或 Append。</exception>
  1660. <exception cref="T:System.ArgumentNullException">
  1661. <paramref name="path" /> 為 null。</exception>
  1662. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1663. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1664. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1665. <exception cref="T:System.UnauthorizedAccessException">
  1666. <paramref name="path" /> 指定為唯讀的檔案,而且 <paramref name="access" /> 不是 Read。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。-或-<paramref name="mode" /> 是 <see cref="F:System.IO.FileMode.Create" />,且指定的檔案是隱藏檔案。</exception>
  1667. <exception cref="T:System.ArgumentOutOfRangeException">
  1668. <paramref name="mode" />、<paramref name="access" /> 或 <paramref name="share" /> 指定了無效值。</exception>
  1669. <exception cref="T:System.IO.FileNotFoundException">找不到在 <paramref name="path" /> 中指定的檔案。</exception>
  1670. <exception cref="T:System.NotSupportedException">
  1671. <paramref name="path" /> 的格式無效。</exception>
  1672. <filterpriority>1</filterpriority>
  1673. <PermissionSet>
  1674. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1675. </PermissionSet>
  1676. </member>
  1677. <member name="M:System.IO.File.OpenRead(System.String)">
  1678. <summary>開啟現有檔案來讀取。</summary>
  1679. <returns>指定路徑上的唯讀 <see cref="T:System.IO.FileStream" />。</returns>
  1680. <param name="path">要被開啟來讀取的檔案。</param>
  1681. <exception cref="T:System.ArgumentException">
  1682. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1683. <exception cref="T:System.ArgumentNullException">
  1684. <paramref name="path" /> 為 null。</exception>
  1685. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1686. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1687. <exception cref="T:System.UnauthorizedAccessException">
  1688. <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  1689. <exception cref="T:System.IO.FileNotFoundException">找不到在 <paramref name="path" /> 中指定的檔案。</exception>
  1690. <exception cref="T:System.NotSupportedException">
  1691. <paramref name="path" /> 的格式無效。</exception>
  1692. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1693. <filterpriority>1</filterpriority>
  1694. <PermissionSet>
  1695. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1696. </PermissionSet>
  1697. </member>
  1698. <member name="M:System.IO.File.OpenText(System.String)">
  1699. <summary>開啟現有 UTF-8 編碼的文字檔來讀取。</summary>
  1700. <returns>指定路徑上的 <see cref="T:System.IO.StreamReader" />。</returns>
  1701. <param name="path">要被開啟來讀取的檔案。</param>
  1702. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1703. <exception cref="T:System.ArgumentException">
  1704. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1705. <exception cref="T:System.ArgumentNullException">
  1706. <paramref name="path" /> 為 null。</exception>
  1707. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1708. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1709. <exception cref="T:System.IO.FileNotFoundException">找不到在 <paramref name="path" /> 中指定的檔案。</exception>
  1710. <exception cref="T:System.NotSupportedException">
  1711. <paramref name="path" /> 的格式無效。</exception>
  1712. <filterpriority>1</filterpriority>
  1713. <PermissionSet>
  1714. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1715. </PermissionSet>
  1716. </member>
  1717. <member name="M:System.IO.File.OpenWrite(System.String)">
  1718. <summary>開啟現有檔案或建立新檔案,以進行寫入。</summary>
  1719. <returns>在指定之路徑上具有 <see cref="T:System.IO.FileStream" /> 存取權的非共用 <see cref="F:System.IO.FileAccess.Write" /> 物件。</returns>
  1720. <param name="path">要被開啟來寫入的檔案。</param>
  1721. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。-或- <paramref name="path" /> 指定為唯讀檔案或目錄。</exception>
  1722. <exception cref="T:System.ArgumentException">
  1723. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1724. <exception cref="T:System.ArgumentNullException">
  1725. <paramref name="path" /> 為 null。</exception>
  1726. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1727. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1728. <exception cref="T:System.NotSupportedException">
  1729. <paramref name="path" /> 的格式無效。</exception>
  1730. <filterpriority>1</filterpriority>
  1731. <PermissionSet>
  1732. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1733. </PermissionSet>
  1734. </member>
  1735. <member name="M:System.IO.File.ReadAllBytes(System.String)">
  1736. <summary>開啟二進位檔案,將檔案內容讀入位元組陣列,然後關閉檔案。</summary>
  1737. <returns>包含檔案內容的位元組陣列。</returns>
  1738. <param name="path">要開啟用於讀取的檔案。</param>
  1739. <exception cref="T:System.ArgumentException">
  1740. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1741. <exception cref="T:System.ArgumentNullException">
  1742. <paramref name="path" /> 為 null。</exception>
  1743. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1744. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1745. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1746. <exception cref="T:System.UnauthorizedAccessException">這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  1747. <exception cref="T:System.IO.FileNotFoundException">找不到在 <paramref name="path" /> 中指定的檔案。</exception>
  1748. <exception cref="T:System.NotSupportedException">
  1749. <paramref name="path" /> 的格式無效。</exception>
  1750. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1751. <filterpriority>1</filterpriority>
  1752. <PermissionSet>
  1753. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1754. </PermissionSet>
  1755. </member>
  1756. <member name="M:System.IO.File.ReadAllLines(System.String)">
  1757. <summary>開啟文字檔,讀取檔案的所有行,然後關閉檔案。</summary>
  1758. <returns>包含檔案所有行的字串陣列。</returns>
  1759. <param name="path">要開啟用於讀取的檔案。</param>
  1760. <exception cref="T:System.ArgumentException">
  1761. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1762. <exception cref="T:System.ArgumentNullException">
  1763. <paramref name="path" /> 為 null。</exception>
  1764. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1765. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1766. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1767. <exception cref="T:System.UnauthorizedAccessException">
  1768. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  1769. <exception cref="T:System.IO.FileNotFoundException">找不到在 <paramref name="path" /> 中指定的檔案。</exception>
  1770. <exception cref="T:System.NotSupportedException">
  1771. <paramref name="path" /> 的格式無效。</exception>
  1772. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1773. <filterpriority>1</filterpriority>
  1774. <PermissionSet>
  1775. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1776. </PermissionSet>
  1777. </member>
  1778. <member name="M:System.IO.File.ReadAllLines(System.String,System.Text.Encoding)">
  1779. <summary>開啟檔案,以指定的編碼方式讀取檔案的所有行,然後關閉檔案。</summary>
  1780. <returns>包含檔案所有行的字串陣列。</returns>
  1781. <param name="path">要開啟用於讀取的檔案。</param>
  1782. <param name="encoding">套用至檔案內容的編碼方式。</param>
  1783. <exception cref="T:System.ArgumentException">
  1784. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1785. <exception cref="T:System.ArgumentNullException">
  1786. <paramref name="path" /> 為 null。</exception>
  1787. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1788. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1789. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1790. <exception cref="T:System.UnauthorizedAccessException">
  1791. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  1792. <exception cref="T:System.IO.FileNotFoundException">找不到在 <paramref name="path" /> 中指定的檔案。</exception>
  1793. <exception cref="T:System.NotSupportedException">
  1794. <paramref name="path" /> 的格式無效。</exception>
  1795. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1796. <filterpriority>1</filterpriority>
  1797. <PermissionSet>
  1798. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1799. </PermissionSet>
  1800. </member>
  1801. <member name="M:System.IO.File.ReadAllText(System.String)">
  1802. <summary>開啟文字檔,讀取檔案的所有行,然後關閉檔案。</summary>
  1803. <returns>包含檔案所有行的字串。</returns>
  1804. <param name="path">要開啟用於讀取的檔案。</param>
  1805. <exception cref="T:System.ArgumentException">
  1806. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1807. <exception cref="T:System.ArgumentNullException">
  1808. <paramref name="path" /> 為 null。</exception>
  1809. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1810. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1811. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1812. <exception cref="T:System.UnauthorizedAccessException">
  1813. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  1814. <exception cref="T:System.IO.FileNotFoundException">找不到在 <paramref name="path" /> 中指定的檔案。</exception>
  1815. <exception cref="T:System.NotSupportedException">
  1816. <paramref name="path" /> 的格式無效。</exception>
  1817. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1818. <filterpriority>1</filterpriority>
  1819. <PermissionSet>
  1820. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1821. </PermissionSet>
  1822. </member>
  1823. <member name="M:System.IO.File.ReadAllText(System.String,System.Text.Encoding)">
  1824. <summary>開啟檔案,以指定的編碼方式讀取檔案的所有行,然後關閉檔案。</summary>
  1825. <returns>包含檔案所有行的字串。</returns>
  1826. <param name="path">要開啟用於讀取的檔案。</param>
  1827. <param name="encoding">套用至檔案內容的編碼方式。</param>
  1828. <exception cref="T:System.ArgumentException">
  1829. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1830. <exception cref="T:System.ArgumentNullException">
  1831. <paramref name="path" /> 為 null。</exception>
  1832. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1833. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1834. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1835. <exception cref="T:System.UnauthorizedAccessException">
  1836. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  1837. <exception cref="T:System.IO.FileNotFoundException">找不到在 <paramref name="path" /> 中指定的檔案。</exception>
  1838. <exception cref="T:System.NotSupportedException">
  1839. <paramref name="path" /> 的格式無效。</exception>
  1840. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1841. <filterpriority>1</filterpriority>
  1842. <PermissionSet>
  1843. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1844. </PermissionSet>
  1845. </member>
  1846. <member name="M:System.IO.File.ReadLines(System.String)">
  1847. <summary>讀取檔案的所有行。</summary>
  1848. <returns>檔案的所有行,或查詢結果的各行。</returns>
  1849. <param name="path">要讀取的檔案。</param>
  1850. <exception cref="T:System.ArgumentException">
  1851. <paramref name="path" /> 是一个零长度字符串,仅包含空白,或者包含由定义的一个或多个无效字符 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法。</exception>
  1852. <exception cref="T:System.ArgumentNullException">
  1853. <paramref name="path" /> 為 null。</exception>
  1854. <exception cref="T:System.IO.DirectoryNotFoundException">
  1855. <paramref name="path" /> 無效 (例如,位於未對應的磁碟機上)。</exception>
  1856. <exception cref="T:System.IO.FileNotFoundException">找不到 <paramref name="path" /> 所指定的檔案。</exception>
  1857. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1858. <exception cref="T:System.IO.PathTooLongException">
  1859. <paramref name="path" /> 超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  1860. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1861. <exception cref="T:System.UnauthorizedAccessException">
  1862. <paramref name="path" /> 指定唯讀的檔案。-或-這個作業在目前平台不受支援。-或-<paramref name="path" /> 是目錄。-或-呼叫端沒有必要的權限。</exception>
  1863. </member>
  1864. <member name="M:System.IO.File.ReadLines(System.String,System.Text.Encoding)">
  1865. <summary>讀取具有指定編碼方式的檔案所有行。</summary>
  1866. <returns>檔案的所有行,或查詢結果的各行。</returns>
  1867. <param name="path">要讀取的檔案。</param>
  1868. <param name="encoding">套用至檔案內容的編碼方式。</param>
  1869. <exception cref="T:System.ArgumentException">
  1870. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法所定義的一個或多個無效字元。</exception>
  1871. <exception cref="T:System.ArgumentNullException">
  1872. <paramref name="path" /> 為 null。</exception>
  1873. <exception cref="T:System.IO.DirectoryNotFoundException">
  1874. <paramref name="path" /> 無效 (例如,位於未對應的磁碟機上)。</exception>
  1875. <exception cref="T:System.IO.FileNotFoundException">找不到 <paramref name="path" /> 所指定的檔案。</exception>
  1876. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  1877. <exception cref="T:System.IO.PathTooLongException">
  1878. <paramref name="path" /> 超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  1879. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  1880. <exception cref="T:System.UnauthorizedAccessException">
  1881. <paramref name="path" /> 指定唯讀的檔案。-或-這個作業在目前平台不受支援。-或-<paramref name="path" /> 是目錄。-或-呼叫端沒有必要的權限。</exception>
  1882. </member>
  1883. <member name="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)">
  1884. <summary>在指定路徑上設定檔案的指定 <see cref="T:System.IO.FileAttributes" />。</summary>
  1885. <param name="path">檔案的路徑。</param>
  1886. <param name="fileAttributes">列舉值的位元組合。</param>
  1887. <exception cref="T:System.ArgumentException">
  1888. <paramref name="path" /> 是空白的、只包含泛空白字元、包含無效字元,或檔案屬性無效。</exception>
  1889. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1890. <exception cref="T:System.NotSupportedException">
  1891. <paramref name="path" /> 的格式無效。</exception>
  1892. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  1893. <exception cref="T:System.IO.FileNotFoundException">找不到檔案。</exception>
  1894. <exception cref="T:System.UnauthorizedAccessException">
  1895. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  1896. <filterpriority>1</filterpriority>
  1897. <PermissionSet>
  1898. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1899. </PermissionSet>
  1900. </member>
  1901. <member name="M:System.IO.File.SetCreationTime(System.String,System.DateTime)">
  1902. <summary>設定檔案建立的日期和時間。</summary>
  1903. <param name="path">要設定其建立日期和時間資訊的檔案。</param>
  1904. <param name="creationTime">
  1905. <see cref="T:System.DateTime" />,包含要為 <paramref name="path" /> 的建立日期和時間設定的值。這個值以本地時間表示。</param>
  1906. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  1907. <exception cref="T:System.ArgumentException">
  1908. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1909. <exception cref="T:System.ArgumentNullException">
  1910. <paramref name="path" /> 為 null。</exception>
  1911. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1912. <exception cref="T:System.IO.IOException">執行作業時發生 I/O 錯誤。</exception>
  1913. <exception cref="T:System.ArgumentOutOfRangeException">
  1914. <paramref name="creationTime" /> 指定這個作業允許的日期、時間或兩者範圍之外的值。</exception>
  1915. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1916. <exception cref="T:System.NotSupportedException">
  1917. <paramref name="path" /> 的格式無效。</exception>
  1918. <filterpriority>1</filterpriority>
  1919. <PermissionSet>
  1920. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1921. </PermissionSet>
  1922. </member>
  1923. <member name="M:System.IO.File.SetCreationTimeUtc(System.String,System.DateTime)">
  1924. <summary>設定檔案建立的日期和時間,格式為國際標準時間 (UTC)。</summary>
  1925. <param name="path">要設定其建立日期和時間資訊的檔案。</param>
  1926. <param name="creationTimeUtc">
  1927. <see cref="T:System.DateTime" />,包含要為 <paramref name="path" /> 的建立日期和時間設定的值。這個值以 UTC 時間表示。</param>
  1928. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  1929. <exception cref="T:System.ArgumentException">
  1930. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1931. <exception cref="T:System.ArgumentNullException">
  1932. <paramref name="path" /> 為 null。</exception>
  1933. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1934. <exception cref="T:System.IO.IOException">執行作業時發生 I/O 錯誤。</exception>
  1935. <exception cref="T:System.ArgumentOutOfRangeException">
  1936. <paramref name="creationTime" /> 指定這個作業允許的日期、時間或兩者範圍之外的值。</exception>
  1937. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1938. <exception cref="T:System.NotSupportedException">
  1939. <paramref name="path" /> 的格式無效。</exception>
  1940. <filterpriority>2</filterpriority>
  1941. <PermissionSet>
  1942. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1943. </PermissionSet>
  1944. </member>
  1945. <member name="M:System.IO.File.SetLastAccessTime(System.String,System.DateTime)">
  1946. <summary>取得指定檔案上一次被存取的日期和時間。</summary>
  1947. <param name="path">要設定其存取日期和時間資訊的檔案。</param>
  1948. <param name="lastAccessTime">
  1949. <see cref="T:System.DateTime" />,包含要為 <paramref name="path" /> 的上次存取日期和時間設定的值。這個值以本地時間表示。</param>
  1950. <exception cref="T:System.ArgumentException">
  1951. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1952. <exception cref="T:System.ArgumentNullException">
  1953. <paramref name="path" /> 為 null。</exception>
  1954. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1955. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  1956. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1957. <exception cref="T:System.NotSupportedException">
  1958. <paramref name="path" /> 的格式無效。</exception>
  1959. <exception cref="T:System.ArgumentOutOfRangeException">
  1960. <paramref name="lastAccessTime" /> 指定這個作業允許的日期或時間範圍以外的值。</exception>
  1961. <filterpriority>1</filterpriority>
  1962. <PermissionSet>
  1963. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1964. </PermissionSet>
  1965. </member>
  1966. <member name="M:System.IO.File.SetLastAccessTimeUtc(System.String,System.DateTime)">
  1967. <summary>設定指定檔案上次被存取的日期和時間,格式為國際標準時間 (UTC)。</summary>
  1968. <param name="path">要設定其存取日期和時間資訊的檔案。</param>
  1969. <param name="lastAccessTimeUtc">
  1970. <see cref="T:System.DateTime" />,包含要為 <paramref name="path" /> 的上次存取日期和時間設定的值。這個值以 UTC 時間表示。</param>
  1971. <exception cref="T:System.ArgumentException">
  1972. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1973. <exception cref="T:System.ArgumentNullException">
  1974. <paramref name="path" /> 為 null。</exception>
  1975. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1976. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  1977. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1978. <exception cref="T:System.NotSupportedException">
  1979. <paramref name="path" /> 的格式無效。</exception>
  1980. <exception cref="T:System.ArgumentOutOfRangeException">
  1981. <paramref name="lastAccessTimeUtc" /> 指定這個作業允許的日期或時間範圍以外的值。</exception>
  1982. <filterpriority>1</filterpriority>
  1983. <PermissionSet>
  1984. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  1985. </PermissionSet>
  1986. </member>
  1987. <member name="M:System.IO.File.SetLastWriteTime(System.String,System.DateTime)">
  1988. <summary>設定指定檔案上次被寫入的日期和時間。</summary>
  1989. <param name="path">要設定其日期和時間資訊的檔案。</param>
  1990. <param name="lastWriteTime">
  1991. <see cref="T:System.DateTime" />,包含要為 <paramref name="path" /> 的上次寫入日期和時間設定的值。這個值以本地時間表示。</param>
  1992. <exception cref="T:System.ArgumentException">
  1993. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  1994. <exception cref="T:System.ArgumentNullException">
  1995. <paramref name="path" /> 為 null。</exception>
  1996. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  1997. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  1998. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  1999. <exception cref="T:System.NotSupportedException">
  2000. <paramref name="path" /> 的格式無效。</exception>
  2001. <exception cref="T:System.ArgumentOutOfRangeException">
  2002. <paramref name="lastWriteTime" /> 指定這個作業允許的日期或時間範圍以外的值。</exception>
  2003. <filterpriority>1</filterpriority>
  2004. <PermissionSet>
  2005. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2006. </PermissionSet>
  2007. </member>
  2008. <member name="M:System.IO.File.SetLastWriteTimeUtc(System.String,System.DateTime)">
  2009. <summary>設定指定檔案上次寫入的日期和時間,格式為國際標準時間 (UTC)。</summary>
  2010. <param name="path">要設定其日期和時間資訊的檔案。</param>
  2011. <param name="lastWriteTimeUtc">
  2012. <see cref="T:System.DateTime" />,包含要為 <paramref name="path" /> 的上次寫入日期和時間設定的值。這個值以 UTC 時間表示。</param>
  2013. <exception cref="T:System.ArgumentException">
  2014. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  2015. <exception cref="T:System.ArgumentNullException">
  2016. <paramref name="path" /> 為 null。</exception>
  2017. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2018. <exception cref="T:System.IO.FileNotFoundException">找不到指定的路徑。</exception>
  2019. <exception cref="T:System.UnauthorizedAccessException">呼叫端沒有必要的權限。</exception>
  2020. <exception cref="T:System.NotSupportedException">
  2021. <paramref name="path" /> 的格式無效。</exception>
  2022. <exception cref="T:System.ArgumentOutOfRangeException">
  2023. <paramref name="lastWriteTimeUtc" /> 指定這個作業允許的日期或時間範圍以外的值。</exception>
  2024. <filterpriority>2</filterpriority>
  2025. <PermissionSet>
  2026. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2027. </PermissionSet>
  2028. </member>
  2029. <member name="M:System.IO.File.WriteAllBytes(System.String,System.Byte[])">
  2030. <summary>建立新檔案,將指定的位元組陣列寫入檔案,然後關閉檔案。如果檔案已經存在,則會覆寫該檔案。</summary>
  2031. <param name="path">要寫入其中的檔案。</param>
  2032. <param name="bytes">要寫入檔案的位元組。</param>
  2033. <exception cref="T:System.ArgumentException">
  2034. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  2035. <exception cref="T:System.ArgumentNullException">
  2036. <paramref name="path" /> 為 null,或位元組陣列為空。</exception>
  2037. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2038. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  2039. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  2040. <exception cref="T:System.UnauthorizedAccessException">
  2041. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  2042. <exception cref="T:System.NotSupportedException">
  2043. <paramref name="path" /> 的格式無效。</exception>
  2044. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2045. <filterpriority>1</filterpriority>
  2046. <PermissionSet>
  2047. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2048. </PermissionSet>
  2049. </member>
  2050. <member name="M:System.IO.File.WriteAllLines(System.String,System.Collections.Generic.IEnumerable{System.String})">
  2051. <summary>建立新檔案,並於檔案中寫入字串的集合,然後關閉檔案。</summary>
  2052. <param name="path">要寫入其中的檔案。</param>
  2053. <param name="contents">要寫入檔案的幾行內容。</param>
  2054. <exception cref="T:System.ArgumentException">
  2055. <paramref name="path" /> 是一个零长度字符串,仅包含空白,或者包含由定义的一个或多个无效字符 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法。</exception>
  2056. <exception cref="T:System.ArgumentNullException">要么<paramref name=" path " />或 <paramref name="contents" /> 是 null。</exception>
  2057. <exception cref="T:System.IO.DirectoryNotFoundException">
  2058. <paramref name="path" /> 無效 (例如,位於未對應的磁碟機上)。</exception>
  2059. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  2060. <exception cref="T:System.IO.PathTooLongException">
  2061. <paramref name="path" /> 超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  2062. <exception cref="T:System.NotSupportedException">
  2063. <paramref name="path" /> 的格式無效。</exception>
  2064. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2065. <exception cref="T:System.UnauthorizedAccessException">
  2066. <paramref name="path" /> 指定唯讀的檔案。-或-這個作業在目前平台不受支援。-或-<paramref name="path" /> 是目錄。-或-呼叫端沒有必要的權限。</exception>
  2067. </member>
  2068. <member name="M:System.IO.File.WriteAllLines(System.String,System.Collections.Generic.IEnumerable{System.String},System.Text.Encoding)">
  2069. <summary>使用指定編碼方式建立新檔案,並將字串的集合寫入檔案,然後關閉檔案。</summary>
  2070. <param name="path">要寫入其中的檔案。</param>
  2071. <param name="contents">要寫入檔案的幾行內容。</param>
  2072. <param name="encoding">要使用的字元編碼。</param>
  2073. <exception cref="T:System.ArgumentException">
  2074. <paramref name="path" /> 是一个零长度字符串,仅包含空白,或者包含由定义的一个或多个无效字符 <see cref="M:System.IO.Path.GetInvalidPathChars" /> 方法。</exception>
  2075. <exception cref="T:System.ArgumentNullException">要么<paramref name=" path" />,,<paramref name=" contents" />, ,或 <paramref name="encoding" /> 是 null。</exception>
  2076. <exception cref="T:System.IO.DirectoryNotFoundException">
  2077. <paramref name="path" /> 無效 (例如,位於未對應的磁碟機上)。</exception>
  2078. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  2079. <exception cref="T:System.IO.PathTooLongException">
  2080. <paramref name="path" /> 超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 個字元,而檔案名稱必須小於 260 個字元。</exception>
  2081. <exception cref="T:System.NotSupportedException">
  2082. <paramref name="path" /> 的格式無效。</exception>
  2083. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2084. <exception cref="T:System.UnauthorizedAccessException">
  2085. <paramref name="path" /> 指定唯讀的檔案。-或-這個作業在目前平台不受支援。-或-<paramref name="path" /> 是目錄。-或-呼叫端沒有必要的權限。</exception>
  2086. </member>
  2087. <member name="M:System.IO.File.WriteAllText(System.String,System.String)">
  2088. <summary>建立新檔案,將指定的字串寫入檔案,然後關閉檔案。如果檔案已經存在,則會覆寫該檔案。</summary>
  2089. <param name="path">要寫入其中的檔案。</param>
  2090. <param name="contents">要寫入檔案的字串。</param>
  2091. <exception cref="T:System.ArgumentException">
  2092. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  2093. <exception cref="T:System.ArgumentNullException">
  2094. <paramref name="path" /> 是 null 或 <paramref name="contents" /> 是空的。 </exception>
  2095. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2096. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  2097. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  2098. <exception cref="T:System.UnauthorizedAccessException">
  2099. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  2100. <exception cref="T:System.NotSupportedException">
  2101. <paramref name="path" /> 的格式無效。</exception>
  2102. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2103. <filterpriority>1</filterpriority>
  2104. <PermissionSet>
  2105. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2106. </PermissionSet>
  2107. </member>
  2108. <member name="M:System.IO.File.WriteAllText(System.String,System.String,System.Text.Encoding)">
  2109. <summary>建立新檔案,使用指定的編碼方式將指定的字串寫入檔案,然後關閉檔案。如果檔案已經存在,則會覆寫該檔案。</summary>
  2110. <param name="path">要寫入其中的檔案。</param>
  2111. <param name="contents">要寫入檔案的字串。</param>
  2112. <param name="encoding">要套用至字串的編碼方式。</param>
  2113. <exception cref="T:System.ArgumentException">
  2114. <paramref name="path" /> 是長度為零的字串、只包含空白字元,或包含一個或多個無效的字元 (如 <see cref="F:System.IO.Path.InvalidPathChars" /> 所定義)。</exception>
  2115. <exception cref="T:System.ArgumentNullException">
  2116. <paramref name="path" /> 是 null 或 <paramref name="contents" /> 是空的。</exception>
  2117. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2118. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效 (例如,位於未對應的磁碟上)。</exception>
  2119. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  2120. <exception cref="T:System.UnauthorizedAccessException">
  2121. <paramref name="path" /> 指定了唯讀的檔案。-或- 這個作業在目前平台不受支援。-或- <paramref name="path" /> 指定了目錄。-或- 呼叫端沒有必要的權限。</exception>
  2122. <exception cref="T:System.NotSupportedException">
  2123. <paramref name="path" /> 的格式無效。</exception>
  2124. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2125. <filterpriority>1</filterpriority>
  2126. <PermissionSet>
  2127. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2128. </PermissionSet>
  2129. </member>
  2130. <member name="T:System.IO.FileInfo">
  2131. <summary>提供建立、複製、刪除、移動和開啟檔案的屬性和執行個體方法,並協助建立 <see cref="T:System.IO.FileStream" /> 物件。此類別無法被繼承。若要浏览此类型的.NET Framework 源代码,请参阅 Reference Source。</summary>
  2132. <filterpriority>1</filterpriority>
  2133. </member>
  2134. <member name="M:System.IO.FileInfo.#ctor(System.String)">
  2135. <summary>初始化 <see cref="T:System.IO.FileInfo" /> 類別的新執行個體,以做為檔案路徑的包裝函式。</summary>
  2136. <param name="fileName">新檔案的完整名稱,或者相對的檔名。不要以目錄分隔符號字元做為路徑的結尾。</param>
  2137. <exception cref="T:System.ArgumentNullException">
  2138. <paramref name="fileName" /> 為 null。</exception>
  2139. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2140. <exception cref="T:System.ArgumentException">檔案名稱是空的,只含有泛空白字元 (White Space),或者含有無效的字元。</exception>
  2141. <exception cref="T:System.UnauthorizedAccessException">存取 <paramref name="fileName" /> 遭拒。</exception>
  2142. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2143. <exception cref="T:System.NotSupportedException">
  2144. <paramref name="fileName" /> 在字串的中間包含一個冒號 (:)。</exception>
  2145. </member>
  2146. <member name="M:System.IO.FileInfo.AppendText">
  2147. <summary>建立將文字附加在 <see cref="T:System.IO.StreamWriter" /> 的這個執行個體所表示之檔案的 <see cref="T:System.IO.FileInfo" />。</summary>
  2148. <returns>新的 StreamWriter。</returns>
  2149. <filterpriority>1</filterpriority>
  2150. <PermissionSet>
  2151. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2152. </PermissionSet>
  2153. </member>
  2154. <member name="M:System.IO.FileInfo.CopyTo(System.String)">
  2155. <summary>複製現有的檔案到新的檔案,不允許覆寫現有的檔案。</summary>
  2156. <returns>有完整路徑的新檔案。</returns>
  2157. <param name="destFileName">要複製的目標新檔案名稱。</param>
  2158. <exception cref="T:System.ArgumentException">
  2159. <paramref name="destFileName" /> 是空的,只含有泛空白字元,或者含有無效的字元。</exception>
  2160. <exception cref="T:System.IO.IOException">發生錯誤,或者目的檔案已經存在。</exception>
  2161. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2162. <exception cref="T:System.ArgumentNullException">
  2163. <paramref name="destFileName" /> 為 null。</exception>
  2164. <exception cref="T:System.UnauthorizedAccessException">傳入目錄路徑,或者檔案正要移至不同的磁碟。</exception>
  2165. <exception cref="T:System.IO.DirectoryNotFoundException">
  2166. <paramref name="destFileName" /> 中指定的目錄不存在。</exception>
  2167. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2168. <exception cref="T:System.NotSupportedException">
  2169. <paramref name="destFileName" /> 的字串包含冒號 (:),但是未指定磁碟區。</exception>
  2170. <filterpriority>1</filterpriority>
  2171. <PermissionSet>
  2172. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2173. </PermissionSet>
  2174. </member>
  2175. <member name="M:System.IO.FileInfo.CopyTo(System.String,System.Boolean)">
  2176. <summary>複製現有的檔案到新檔案,允許覆寫現有的檔案。</summary>
  2177. <returns>新檔案,或現有檔案的覆寫 (如果 <paramref name="overwrite" /> 為 true)。如果檔案存在而且 <paramref name="overwrite" /> 為 false,則會擲回 <see cref="T:System.IO.IOException" />。</returns>
  2178. <param name="destFileName">要複製的目標新檔案名稱。</param>
  2179. <param name="overwrite">若允許覆寫現有檔案,則為 true,否則為 false。</param>
  2180. <exception cref="T:System.ArgumentException">
  2181. <paramref name="destFileName" /> 是空的,只含有泛空白字元,或者含有無效的字元。</exception>
  2182. <exception cref="T:System.IO.IOException">發生錯誤,或者目的檔案已經存在,而且 <paramref name="overwrite" /> 為 false。</exception>
  2183. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2184. <exception cref="T:System.ArgumentNullException">
  2185. <paramref name="destFileName" /> 為 null。</exception>
  2186. <exception cref="T:System.IO.DirectoryNotFoundException">
  2187. <paramref name="destFileName" /> 中指定的目錄不存在。</exception>
  2188. <exception cref="T:System.UnauthorizedAccessException">傳入目錄路徑,或者檔案正要移至不同的磁碟。</exception>
  2189. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2190. <exception cref="T:System.NotSupportedException">
  2191. <paramref name="destFileName" /> 在字串的中間包含一個冒號 (:)。</exception>
  2192. <filterpriority>1</filterpriority>
  2193. <PermissionSet>
  2194. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2195. </PermissionSet>
  2196. </member>
  2197. <member name="M:System.IO.FileInfo.Create">
  2198. <summary>建立檔案。</summary>
  2199. <returns>新檔案。</returns>
  2200. <filterpriority>1</filterpriority>
  2201. <PermissionSet>
  2202. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2203. </PermissionSet>
  2204. </member>
  2205. <member name="M:System.IO.FileInfo.CreateText">
  2206. <summary>建立寫入新文字檔的 <see cref="T:System.IO.StreamWriter" />。</summary>
  2207. <returns>新的 StreamWriter。</returns>
  2208. <exception cref="T:System.UnauthorizedAccessException">檔案名稱是個目錄。</exception>
  2209. <exception cref="T:System.IO.IOException">磁碟是唯讀的。</exception>
  2210. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2211. <filterpriority>1</filterpriority>
  2212. <PermissionSet>
  2213. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2214. </PermissionSet>
  2215. </member>
  2216. <member name="M:System.IO.FileInfo.Delete">
  2217. <summary>永遠地刪除檔案。</summary>
  2218. <exception cref="T:System.IO.IOException">目標檔案是開啟的,或者記憶體映射的電腦執行的是 Microsoft Windows NT。-或-此檔案具有開啟控制代碼,而且作業系統是 Windows XP 或先前的版本。這個開啟控制代碼可能是列舉目錄和檔案所產生。如需詳細資訊,請參閱如何:列舉目錄和檔案。</exception>
  2219. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2220. <exception cref="T:System.UnauthorizedAccessException">路徑是個目錄。</exception>
  2221. <filterpriority>1</filterpriority>
  2222. <PermissionSet>
  2223. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2224. </PermissionSet>
  2225. </member>
  2226. <member name="P:System.IO.FileInfo.Directory">
  2227. <summary>取得父代 (Parent) 目錄的執行個體。</summary>
  2228. <returns>
  2229. <see cref="T:System.IO.DirectoryInfo" />物件,代表這個檔案的父代目錄。</returns>
  2230. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2231. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2232. <filterpriority>1</filterpriority>
  2233. <PermissionSet>
  2234. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2235. </PermissionSet>
  2236. </member>
  2237. <member name="P:System.IO.FileInfo.DirectoryName">
  2238. <summary>取得表示目錄完整路徑的字串。</summary>
  2239. <returns>字串,表示目錄的完整路徑。</returns>
  2240. <exception cref="T:System.ArgumentNullException">為目錄名稱傳入 null。</exception>
  2241. <exception cref="T:System.IO.PathTooLongException">完整路徑是 260 個以上的字元。</exception>
  2242. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2243. <filterpriority>1</filterpriority>
  2244. <PermissionSet>
  2245. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2246. </PermissionSet>
  2247. </member>
  2248. <member name="P:System.IO.FileInfo.Exists">
  2249. <summary>取得值,這個值指出檔案是否存在。</summary>
  2250. <returns>如果檔案存在,則為 true;如果檔案不存在或者檔案是目錄,則為 false。</returns>
  2251. <filterpriority>1</filterpriority>
  2252. </member>
  2253. <member name="P:System.IO.FileInfo.IsReadOnly">
  2254. <summary>取得或設定值,判斷目前檔案是否為唯讀。</summary>
  2255. <returns>如果目前檔案為唯讀,則為 true,否則為 false。</returns>
  2256. <exception cref="T:System.IO.FileNotFoundException">找不到目前 <see cref="T:System.IO.FileInfo" /> 物件所描述的檔案。</exception>
  2257. <exception cref="T:System.IO.IOException">開啟檔案時發生 I/O 錯誤。</exception>
  2258. <exception cref="T:System.UnauthorizedAccessException">這個作業在目前平台不受支援。-或- 呼叫端沒有必要的權限。</exception>
  2259. <exception cref="T:System.ArgumentException">使用者沒有寫入權限,卻嘗試將這個屬性設定為false。</exception>
  2260. <filterpriority>1</filterpriority>
  2261. </member>
  2262. <member name="P:System.IO.FileInfo.Length">
  2263. <summary>取得目前檔案的大小,以位元組為單位。</summary>
  2264. <returns>目前檔案的大小,以位元組為單位。</returns>
  2265. <exception cref="T:System.IO.IOException">
  2266. <see cref="M:System.IO.FileSystemInfo.Refresh" /> 不能更新檔案或目錄的狀態。</exception>
  2267. <exception cref="T:System.IO.FileNotFoundException">檔案不存在。-或- 呼叫目錄的 Length 屬性。</exception>
  2268. <filterpriority>1</filterpriority>
  2269. </member>
  2270. <member name="M:System.IO.FileInfo.MoveTo(System.String)">
  2271. <summary>移動指定的檔案至新的位置,提供指定新檔名的選項。</summary>
  2272. <param name="destFileName">要將檔案移至的路徑,可以指定不同的檔名。</param>
  2273. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如目的檔案已經存在,或者目的裝置未就緒。</exception>
  2274. <exception cref="T:System.ArgumentNullException">
  2275. <paramref name="destFileName" /> 為 null。</exception>
  2276. <exception cref="T:System.ArgumentException">
  2277. <paramref name="destFileName" /> 是空的,只含有泛空白字元,或者含有無效的字元。</exception>
  2278. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2279. <exception cref="T:System.UnauthorizedAccessException">
  2280. <paramref name="destFileName" /> 是唯讀的或者是目錄。</exception>
  2281. <exception cref="T:System.IO.FileNotFoundException">找不到檔案。</exception>
  2282. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2283. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2284. <exception cref="T:System.NotSupportedException">
  2285. <paramref name="destFileName" /> 在字串的中間包含一個冒號 (:)。</exception>
  2286. <filterpriority>1</filterpriority>
  2287. <PermissionSet>
  2288. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2289. </PermissionSet>
  2290. </member>
  2291. <member name="P:System.IO.FileInfo.Name">
  2292. <summary>取得檔案的名稱。</summary>
  2293. <returns>檔案的檔名。</returns>
  2294. <filterpriority>1</filterpriority>
  2295. </member>
  2296. <member name="M:System.IO.FileInfo.Open(System.IO.FileMode)">
  2297. <summary>使用指定模式來開啟檔案。</summary>
  2298. <returns>以指定模式開啟的檔案,其使用讀取/寫入存取且為不共用。</returns>
  2299. <param name="mode">
  2300. <see cref="T:System.IO.FileMode" /> 常數,指定用於開啟檔案的模式 (例如,Open 或 Append)。</param>
  2301. <exception cref="T:System.IO.FileNotFoundException">找不到檔案。</exception>
  2302. <exception cref="T:System.UnauthorizedAccessException">檔案是唯讀的或者是目錄。</exception>
  2303. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2304. <exception cref="T:System.IO.IOException">檔案已經開啟。</exception>
  2305. <filterpriority>2</filterpriority>
  2306. <PermissionSet>
  2307. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2308. </PermissionSet>
  2309. </member>
  2310. <member name="M:System.IO.FileInfo.Open(System.IO.FileMode,System.IO.FileAccess)">
  2311. <summary>使用讀取、寫入或讀取/寫入存取,並以指定模式來開啟檔案。</summary>
  2312. <returns>
  2313. <see cref="T:System.IO.FileStream" /> 物件,開啟於指定模式和存取中,且為不共用。</returns>
  2314. <param name="mode">
  2315. <see cref="T:System.IO.FileMode" /> 常數,指定用於開啟檔案的模式 (例如,Open 或 Append)。</param>
  2316. <param name="access">
  2317. <see cref="T:System.IO.FileAccess" /> 常數,指定是否以 Read、Write 或 ReadWrite 檔案存取來開啟檔案。</param>
  2318. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2319. <exception cref="T:System.IO.FileNotFoundException">找不到檔案。</exception>
  2320. <exception cref="T:System.UnauthorizedAccessException">
  2321. <paramref name="path" /> 是唯讀的或者是目錄。</exception>
  2322. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2323. <exception cref="T:System.IO.IOException">檔案已經開啟。</exception>
  2324. <filterpriority>2</filterpriority>
  2325. <PermissionSet>
  2326. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2327. </PermissionSet>
  2328. </member>
  2329. <member name="M:System.IO.FileInfo.Open(System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)">
  2330. <summary>使用讀取、寫入或讀取/寫入存取和指定的共用選項,將檔案開啟於指定模式中。</summary>
  2331. <returns>
  2332. <see cref="T:System.IO.FileStream" /> 物件,以指定的模式、存取和共用選項開啟。</returns>
  2333. <param name="mode">
  2334. <see cref="T:System.IO.FileMode" /> 常數,指定用於開啟檔案的模式 (例如,Open 或 Append)。</param>
  2335. <param name="access">
  2336. <see cref="T:System.IO.FileAccess" /> 常數,指定是否以 Read、Write 或 ReadWrite 檔案存取來開啟檔案。</param>
  2337. <param name="share">
  2338. <see cref="T:System.IO.FileShare" /> 常數,指定其他 FileStream 物件對這個檔案的存取類型。</param>
  2339. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2340. <exception cref="T:System.IO.FileNotFoundException">找不到檔案。</exception>
  2341. <exception cref="T:System.UnauthorizedAccessException">
  2342. <paramref name="path" /> 是唯讀的或者是目錄。</exception>
  2343. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2344. <exception cref="T:System.IO.IOException">檔案已經開啟。</exception>
  2345. <filterpriority>2</filterpriority>
  2346. <PermissionSet>
  2347. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2348. </PermissionSet>
  2349. </member>
  2350. <member name="M:System.IO.FileInfo.OpenRead">
  2351. <summary>建立唯讀的 <see cref="T:System.IO.FileStream" />。</summary>
  2352. <returns>新的唯讀 <see cref="T:System.IO.FileStream" /> 物件。</returns>
  2353. <exception cref="T:System.UnauthorizedAccessException">
  2354. <paramref name="path" /> 是唯讀的或者是目錄。</exception>
  2355. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2356. <exception cref="T:System.IO.IOException">檔案已經開啟。</exception>
  2357. <filterpriority>2</filterpriority>
  2358. <PermissionSet>
  2359. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2360. </PermissionSet>
  2361. </member>
  2362. <member name="M:System.IO.FileInfo.OpenText">
  2363. <summary>建立從現有文字檔讀取的 <see cref="T:System.IO.StreamReader" /> (具有 UTF8 編碼方式)。</summary>
  2364. <returns>具有 UTF8 編碼方式的新 StreamReader。</returns>
  2365. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2366. <exception cref="T:System.IO.FileNotFoundException">找不到檔案。</exception>
  2367. <exception cref="T:System.UnauthorizedAccessException">
  2368. <paramref name="path" /> 是唯讀的或者是目錄。</exception>
  2369. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2370. <filterpriority>2</filterpriority>
  2371. <PermissionSet>
  2372. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2373. </PermissionSet>
  2374. </member>
  2375. <member name="M:System.IO.FileInfo.OpenWrite">
  2376. <summary>建立唯寫的 <see cref="T:System.IO.FileStream" />。</summary>
  2377. <returns>新檔案或現有檔案的唯寫非共用 <see cref="T:System.IO.FileStream" /> 物件。</returns>
  2378. <exception cref="T:System.UnauthorizedAccessException">在建立 <see cref="T:System.IO.FileInfo" /> 物件的執行個體時所指定的路徑唯讀的或是目錄。 </exception>
  2379. <exception cref="T:System.IO.DirectoryNotFoundException">在建立 <see cref="T:System.IO.FileInfo" /> 物件的執行個體時所指定的路徑無效,例如位在未對應的磁碟機上。</exception>
  2380. <filterpriority>2</filterpriority>
  2381. <PermissionSet>
  2382. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2383. </PermissionSet>
  2384. </member>
  2385. <member name="M:System.IO.FileInfo.ToString">
  2386. <summary>將路徑當做字串傳回。</summary>
  2387. <returns>表示路徑的字串。</returns>
  2388. <filterpriority>1</filterpriority>
  2389. </member>
  2390. <member name="T:System.IO.FileOptions">
  2391. <summary>表示用於建立 <see cref="T:System.IO.FileStream" /> 物件的進階選項。</summary>
  2392. <filterpriority>1</filterpriority>
  2393. </member>
  2394. <member name="F:System.IO.FileOptions.Asynchronous">
  2395. <summary>表示檔案可用於非同步讀取和寫入。</summary>
  2396. </member>
  2397. <member name="F:System.IO.FileOptions.DeleteOnClose">
  2398. <summary>表示檔案不再使用時會自動刪除。</summary>
  2399. </member>
  2400. <member name="F:System.IO.FileOptions.Encrypted">
  2401. <summary>表示檔案已加密,而且只能使用相同的加密使用者帳戶才能解密。</summary>
  2402. </member>
  2403. <member name="F:System.IO.FileOptions.None">
  2404. <summary>表示建立 <see cref="T:System.IO.FileStream" /> 物件時,不應使用任何其他選項。</summary>
  2405. </member>
  2406. <member name="F:System.IO.FileOptions.RandomAccess">
  2407. <summary>表示檔案是隨機存取的。系統可使用這個做為最佳化檔案快取的提示。</summary>
  2408. </member>
  2409. <member name="F:System.IO.FileOptions.SequentialScan">
  2410. <summary>表示檔案是按順序從開頭至結尾依序存取。系統可使用這個做為最佳化檔案快取的提示。如果應用程式藉移動檔案指標來進行隨機存取,則可能不會發生最佳快取;然而,仍然保證正確的作業。</summary>
  2411. </member>
  2412. <member name="F:System.IO.FileOptions.WriteThrough">
  2413. <summary>表示系統應透過中繼快取直接寫入磁碟。</summary>
  2414. </member>
  2415. <member name="T:System.IO.FileStream">
  2416. <summary>為檔案提供 <see cref="T:System.IO.Stream" />,同時支援同步與非同步讀取和寫入作業。若要浏览此类型的.NET Framework 源代码,请参阅 Reference Source。</summary>
  2417. <filterpriority>1</filterpriority>
  2418. </member>
  2419. <member name="M:System.IO.FileStream.#ctor(Microsoft.Win32.SafeHandles.SafeFileHandle,System.IO.FileAccess)">
  2420. <summary>使用指定的讀取/寫入權限,初始化指定檔案控制代碼之 <see cref="T:System.IO.FileStream" /> 類別的新執行個體。</summary>
  2421. <param name="handle">目前 FileStream 物件將會封裝之檔案的檔案控制代碼。</param>
  2422. <param name="access">常數,設定 FileStream 物件的 <see cref="P:System.IO.FileStream.CanRead" /> 與 <see cref="P:System.IO.FileStream.CanWrite" /> 屬性。</param>
  2423. <exception cref="T:System.ArgumentException">
  2424. <paramref name="access" /> 不是 <see cref="T:System.IO.FileAccess" /> 的欄位。</exception>
  2425. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2426. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如磁碟錯誤。-或-已關閉資料流。</exception>
  2427. <exception cref="T:System.UnauthorizedAccessException">指定之檔案控制代碼的作業系統不允許所要求的 <paramref name="access" />,例如,當 <paramref name="access" /> 為 Write 或 ReadWrite,而檔案控制代碼設定成唯讀存取時。</exception>
  2428. </member>
  2429. <member name="M:System.IO.FileStream.#ctor(Microsoft.Win32.SafeHandles.SafeFileHandle,System.IO.FileAccess,System.Int32)">
  2430. <summary>使用指定的讀取/寫入權限和緩衝區大小,初始化指定的檔案控制代碼之 <see cref="T:System.IO.FileStream" /> 類別的新執行個體。</summary>
  2431. <param name="handle">目前 FileStream 物件將會封裝之檔案的檔案控制代碼。</param>
  2432. <param name="access">
  2433. <see cref="T:System.IO.FileAccess" /> 常數,它會設定 FileStream 物件的 <see cref="P:System.IO.FileStream.CanRead" /> 與 <see cref="P:System.IO.FileStream.CanWrite" /> 屬性。</param>
  2434. <param name="bufferSize">大於 0 的 <see cref="T:System.Int32" /> 正值,指出緩衝區大小。預設緩衝區大小為 4096。</param>
  2435. <exception cref="T:System.ArgumentException">
  2436. <paramref name="handle" /> 參數是無效的控制代碼。-或-<paramref name="handle" /> 參數是同步控制代碼,且已非同步使用。</exception>
  2437. <exception cref="T:System.ArgumentOutOfRangeException">
  2438. <paramref name="bufferSize" /> 參數為負數。</exception>
  2439. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如磁碟錯誤。-或-已關閉資料流。 </exception>
  2440. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2441. <exception cref="T:System.UnauthorizedAccessException">指定之檔案控制代碼的作業系統不允許所要求的 <paramref name="access" />,例如,當 <paramref name="access" /> 為 Write 或 ReadWrite,而檔案控制代碼設定成唯讀存取時。</exception>
  2442. </member>
  2443. <member name="M:System.IO.FileStream.#ctor(Microsoft.Win32.SafeHandles.SafeFileHandle,System.IO.FileAccess,System.Int32,System.Boolean)">
  2444. <summary>使用指定的讀取/寫入權限、緩衝區大小和同步或非同步狀態,初始化指定的檔案控制代碼之 <see cref="T:System.IO.FileStream" /> 類別的新執行個體。</summary>
  2445. <param name="handle">這個 FileStream 物件將會封裝之檔案的檔案控制代碼。</param>
  2446. <param name="access">常數,設定 FileStream 物件的 <see cref="P:System.IO.FileStream.CanRead" /> 與 <see cref="P:System.IO.FileStream.CanWrite" /> 屬性。</param>
  2447. <param name="bufferSize">大於 0 的 <see cref="T:System.Int32" /> 正值,指出緩衝區大小。預設緩衝區大小為 4096。</param>
  2448. <param name="isAsync">如果控制代碼為非同步開啟 (也就是,在重疊 I/O 模式),則為 true;否則為 false。</param>
  2449. <exception cref="T:System.ArgumentException">
  2450. <paramref name="handle" /> 參數是無效的控制代碼。-或-<paramref name="handle" /> 參數是同步控制代碼,且已非同步使用。</exception>
  2451. <exception cref="T:System.ArgumentOutOfRangeException">
  2452. <paramref name="bufferSize" /> 參數為負數。</exception>
  2453. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如磁碟錯誤。-或-已關閉資料流。 </exception>
  2454. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2455. <exception cref="T:System.UnauthorizedAccessException">指定之檔案控制代碼的作業系統不允許所要求的 <paramref name="access" />,例如,當 <paramref name="access" /> 為 Write 或 ReadWrite,而檔案控制代碼設定成唯讀存取時。</exception>
  2456. </member>
  2457. <member name="M:System.IO.FileStream.#ctor(System.String,System.IO.FileMode)">
  2458. <summary>使用指定的路徑和建立模式初始化 <see cref="T:System.IO.FileStream" /> 類別的新執行個體。</summary>
  2459. <param name="path">目前 FileStream 物件將會封裝之檔案的相對或絕對路徑。</param>
  2460. <param name="mode">常數,決定如何開啟或建立檔案。</param>
  2461. <exception cref="T:System.ArgumentException">
  2462. <paramref name="path" /> 為空字串 ("")、只包含泛空白字元,或包含一個或多個無效的字元。-或-<paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在 NTFS 环境中。</exception>
  2463. <exception cref="T:System.NotSupportedException">
  2464. <paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在非 NTFS 环境中。</exception>
  2465. <exception cref="T:System.ArgumentNullException">
  2466. <paramref name="path" /> 為 null。</exception>
  2467. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2468. <exception cref="T:System.IO.FileNotFoundException">無法找到檔案,例如,當 <paramref name="mode" /> 為 FileMode.Truncate 或 FileMode.Open,而且 <paramref name="path" /> 指定的檔案不存在的時候。檔案必須已在這些模式中存在。</exception>
  2469. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如在 FileMode.CreateNew 指定的檔案已經存在時指定 <paramref name="path" />。-或-已關閉資料流。</exception>
  2470. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2471. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2472. <exception cref="T:System.ArgumentOutOfRangeException">
  2473. <paramref name="mode" /> 包含無效的值。</exception>
  2474. </member>
  2475. <member name="M:System.IO.FileStream.#ctor(System.String,System.IO.FileMode,System.IO.FileAccess)">
  2476. <summary>使用指定路徑、建立模式和讀取/寫入權限,初始化 <see cref="T:System.IO.FileStream" /> 類別的新執行個體。</summary>
  2477. <param name="path">目前 FileStream 物件將會封裝之檔案的相對或絕對路徑。</param>
  2478. <param name="mode">常數,決定如何開啟或建立檔案。</param>
  2479. <param name="access">常數,決定 FileStream 物件如何存取檔案。這也可以判斷 FileStream 物件之 <see cref="P:System.IO.FileStream.CanRead" /> 與 <see cref="P:System.IO.FileStream.CanWrite" /> 屬性傳回的值。如果 <paramref name="path" /> 指定了磁碟檔案,則 <see cref="P:System.IO.FileStream.CanSeek" /> 為 true。</param>
  2480. <exception cref="T:System.ArgumentNullException">
  2481. <paramref name="path" /> 為 null。</exception>
  2482. <exception cref="T:System.ArgumentException">
  2483. <paramref name="path" /> 為空字串 ("")、只包含泛空白字元,或包含一個或多個無效的字元。-或-<paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在 NTFS 环境中。</exception>
  2484. <exception cref="T:System.NotSupportedException">
  2485. <paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在非 NTFS 环境中。</exception>
  2486. <exception cref="T:System.IO.FileNotFoundException">無法找到檔案,例如,當 <paramref name="mode" /> 為 FileMode.Truncate 或 FileMode.Open,而且 <paramref name="path" /> 指定的檔案不存在的時候。檔案必須已在這些模式中存在。</exception>
  2487. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如在 FileMode.CreateNew 指定的檔案已經存在時指定 <paramref name="path" />。-或-已關閉資料流。</exception>
  2488. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2489. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2490. <exception cref="T:System.UnauthorizedAccessException">指定之 <paramref name="access" /> 的作業系統不允許所要求的 <paramref name="path" />,例如,當 <paramref name="access" /> 為 Write 或 ReadWrite,且檔案或目錄設定為唯讀存取時。</exception>
  2491. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2492. <exception cref="T:System.ArgumentOutOfRangeException">
  2493. <paramref name="mode" /> 包含無效的值。</exception>
  2494. </member>
  2495. <member name="M:System.IO.FileStream.#ctor(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)">
  2496. <summary>使用指定路徑、建立模式、讀取/寫入權限和共用權限,初始化 <see cref="T:System.IO.FileStream" /> 類別的新執行個體。</summary>
  2497. <param name="path">目前 FileStream 物件將會封裝之檔案的相對或絕對路徑。</param>
  2498. <param name="mode">常數,決定如何開啟或建立檔案。</param>
  2499. <param name="access">常數,決定 FileStream 物件如何存取檔案。這也可以判斷 FileStream 物件之 <see cref="P:System.IO.FileStream.CanRead" /> 與 <see cref="P:System.IO.FileStream.CanWrite" /> 屬性傳回的值。如果 <paramref name="path" /> 指定了磁碟檔案,則 <see cref="P:System.IO.FileStream.CanSeek" /> 為 true。</param>
  2500. <param name="share">常數,決定處理程序如何共用檔案。</param>
  2501. <exception cref="T:System.ArgumentNullException">
  2502. <paramref name="path" /> 為 null。</exception>
  2503. <exception cref="T:System.ArgumentException">
  2504. <paramref name="path" /> 為空字串 ("")、只包含泛空白字元,或包含一個或多個無效的字元。-或-<paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在 NTFS 环境中。</exception>
  2505. <exception cref="T:System.NotSupportedException">
  2506. <paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在非 NTFS 环境中。</exception>
  2507. <exception cref="T:System.IO.FileNotFoundException">無法找到檔案,例如,當 <paramref name="mode" /> 為 FileMode.Truncate 或 FileMode.Open,而且 <paramref name="path" /> 指定的檔案不存在的時候。檔案必須已在這些模式中存在。</exception>
  2508. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如在 FileMode.CreateNew 指定的檔案已經存在時指定 <paramref name="path" />。-或-系統在執行 Windows 98 或 Windows 98 SE,且 <paramref name="share" /> 設定為 FileShare.Delete。-或-已關閉資料流。</exception>
  2509. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2510. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2511. <exception cref="T:System.UnauthorizedAccessException">指定之 <paramref name="access" /> 的作業系統不允許所要求的 <paramref name="path" />,例如,當 <paramref name="access" /> 為 Write 或 ReadWrite,且檔案或目錄設定為唯讀存取時。</exception>
  2512. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2513. <exception cref="T:System.ArgumentOutOfRangeException">
  2514. <paramref name="mode" /> 包含無效的值。</exception>
  2515. </member>
  2516. <member name="M:System.IO.FileStream.#ctor(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.Int32)">
  2517. <summary>使用指定路徑、建立模式、讀取/寫入與共用權限與緩衝區大小,初始化 <see cref="T:System.IO.FileStream" /> 類別的新執行個體。</summary>
  2518. <param name="path">目前 FileStream 物件將會封裝之檔案的相對或絕對路徑。</param>
  2519. <param name="mode">常數,決定如何開啟或建立檔案。</param>
  2520. <param name="access">常數,決定 FileStream 物件如何存取檔案。這也可以判斷 FileStream 物件之 <see cref="P:System.IO.FileStream.CanRead" /> 與 <see cref="P:System.IO.FileStream.CanWrite" /> 屬性傳回的值。如果 <paramref name="path" /> 指定了磁碟檔案,則 <see cref="P:System.IO.FileStream.CanSeek" /> 為 true。</param>
  2521. <param name="share">常數,決定處理程序如何共用檔案。</param>
  2522. <param name="bufferSize">大於 0 的 <see cref="T:System.Int32" /> 正值,指出緩衝區大小。預設緩衝區大小為 4096。</param>
  2523. <exception cref="T:System.ArgumentNullException">
  2524. <paramref name="path" /> 為 null。</exception>
  2525. <exception cref="T:System.ArgumentException">
  2526. <paramref name="path" /> 為空字串 ("")、只包含泛空白字元,或包含一個或多個無效的字元。-或-<paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在 NTFS 环境中。</exception>
  2527. <exception cref="T:System.NotSupportedException">
  2528. <paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在非 NTFS 环境中。</exception>
  2529. <exception cref="T:System.ArgumentOutOfRangeException">
  2530. <paramref name="bufferSize" /> 為負值或零。-或- <paramref name="mode" />、<paramref name="access" /> 或 <paramref name="share" /> 包含無效值。</exception>
  2531. <exception cref="T:System.IO.FileNotFoundException">無法找到檔案,例如,當 <paramref name="mode" /> 為 FileMode.Truncate 或 FileMode.Open,而且 <paramref name="path" /> 指定的檔案不存在的時候。檔案必須已在這些模式中存在。</exception>
  2532. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如在 FileMode.CreateNew 指定的檔案已經存在時指定 <paramref name="path" />。-或-系統在執行 Windows 98 或 Windows 98 SE,且 <paramref name="share" /> 設定為 FileShare.Delete。-或-已關閉資料流。</exception>
  2533. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2534. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2535. <exception cref="T:System.UnauthorizedAccessException">指定之 <paramref name="access" /> 的作業系統不允許所要求的 <paramref name="path" />,例如,當 <paramref name="access" /> 為 Write 或 ReadWrite,且檔案或目錄設定為唯讀存取時。</exception>
  2536. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2537. </member>
  2538. <member name="M:System.IO.FileStream.#ctor(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.Int32,System.Boolean)">
  2539. <summary>使用指定路徑、建立模式、讀取/寫入與共用權限、緩衝大小與同步或非同步狀態,初始化 <see cref="T:System.IO.FileStream" /> 類別的新執行個體。</summary>
  2540. <param name="path">目前 FileStream 物件將會封裝之檔案的相對或絕對路徑。</param>
  2541. <param name="mode">常數,決定如何開啟或建立檔案。</param>
  2542. <param name="access">常數,決定 FileStream 物件如何存取檔案。這也可以判斷 FileStream 物件之 <see cref="P:System.IO.FileStream.CanRead" /> 與 <see cref="P:System.IO.FileStream.CanWrite" /> 屬性傳回的值。如果 <paramref name="path" /> 指定了磁碟檔案,則 <see cref="P:System.IO.FileStream.CanSeek" /> 為 true。</param>
  2543. <param name="share">常數,決定處理程序如何共用檔案。</param>
  2544. <param name="bufferSize">大於 0 的 <see cref="T:System.Int32" /> 正值,指出緩衝區大小。預設緩衝區大小為 4096。</param>
  2545. <param name="useAsync">指定要使用非同步 I/O 或同步 I/O。但是,請注意:基礎作業系統可能並不支援非同步 I/O,所以在指定 true 時,可能會視平台以同步方式開啟控制代碼。在以非同步方式開啟時,<see cref="M:System.IO.FileStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /> 與 <see cref="M:System.IO.FileStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /> 方法對大量讀取或寫入的作業會有較佳的效能,但對於少量讀取和寫入的作業卻會比較慢。如果要將應用程式設計成使用非同步 I/O,請將 <paramref name="useAsync" /> 參數設定為 true。正確地使用非同步 I/O,可以讓應用程式的執行快上十倍,但如果沒有配合非同步 I/O 的需求重新設計應用程式,卻會降低十倍的效能。</param>
  2546. <exception cref="T:System.ArgumentNullException">
  2547. <paramref name="path" /> 為 null。</exception>
  2548. <exception cref="T:System.ArgumentException">
  2549. <paramref name="path" /> 為空字串 ("")、只包含泛空白字元,或包含一個或多個無效的字元。-或-<paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在 NTFS 环境中。</exception>
  2550. <exception cref="T:System.NotSupportedException">
  2551. <paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在非 NTFS 环境中。</exception>
  2552. <exception cref="T:System.ArgumentOutOfRangeException">
  2553. <paramref name="bufferSize" /> 為負值或零。-或- <paramref name="mode" />、<paramref name="access" /> 或 <paramref name="share" /> 包含無效值。</exception>
  2554. <exception cref="T:System.IO.FileNotFoundException">無法找到檔案,例如,當 <paramref name="mode" /> 為 FileMode.Truncate 或 FileMode.Open,而且 <paramref name="path" /> 指定的檔案不存在的時候。檔案必須已在這些模式中存在。</exception>
  2555. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如在 FileMode.CreateNew 指定的檔案已經存在時指定 <paramref name="path" />。-或- 系統在執行 Windows 98 或 Windows 98 SE,且 <paramref name="share" /> 設定為 FileShare.Delete。-或-已關閉資料流。</exception>
  2556. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2557. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2558. <exception cref="T:System.UnauthorizedAccessException">指定之 <paramref name="access" /> 的作業系統不允許所要求的 <paramref name="path" />,例如,當 <paramref name="access" /> 為 Write 或 ReadWrite,且檔案或目錄設定為唯讀存取時。</exception>
  2559. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2560. </member>
  2561. <member name="M:System.IO.FileStream.#ctor(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.Int32,System.IO.FileOptions)">
  2562. <summary>使用指定的路徑、建立模式、讀取/寫入與共用權限、其他 FileStream 對同一檔案的存取權、緩衝區大小和其他檔案選項,初始化 <see cref="T:System.IO.FileStream" /> 類別的新執行個體。</summary>
  2563. <param name="path">目前 FileStream 物件將會封裝之檔案的相對或絕對路徑。</param>
  2564. <param name="mode">常數,決定如何開啟或建立檔案。</param>
  2565. <param name="access">常數,決定 FileStream 物件如何存取檔案。這也可以判斷 FileStream 物件之 <see cref="P:System.IO.FileStream.CanRead" /> 與 <see cref="P:System.IO.FileStream.CanWrite" /> 屬性傳回的值。如果 <paramref name="path" /> 指定了磁碟檔案,則 <see cref="P:System.IO.FileStream.CanSeek" /> 為 true。</param>
  2566. <param name="share">常數,決定處理程序如何共用檔案。</param>
  2567. <param name="bufferSize">大於 0 的 <see cref="T:System.Int32" /> 正值,指出緩衝區大小。預設緩衝區大小為 4096。</param>
  2568. <param name="options">值,指定其他檔案選項。</param>
  2569. <exception cref="T:System.ArgumentNullException">
  2570. <paramref name="path" /> 為 null。</exception>
  2571. <exception cref="T:System.ArgumentException">
  2572. <paramref name="path" /> 為空字串 ("")、只包含泛空白字元,或包含一個或多個無效的字元。-或-<paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在 NTFS 环境中。</exception>
  2573. <exception cref="T:System.NotSupportedException">
  2574. <paramref name="path" /> 指非文件设备,如"con:"、"com1:","lpt1:",等等。在非 NTFS 环境中。</exception>
  2575. <exception cref="T:System.ArgumentOutOfRangeException">
  2576. <paramref name="bufferSize" /> 為負值或零。-或- <paramref name="mode" />、<paramref name="access" /> 或 <paramref name="share" /> 包含無效值。</exception>
  2577. <exception cref="T:System.IO.FileNotFoundException">無法找到檔案,例如,當 <paramref name="mode" /> 為 FileMode.Truncate 或 FileMode.Open,而且 <paramref name="path" /> 指定的檔案不存在的時候。檔案必須已在這些模式中存在。</exception>
  2578. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如在 FileMode.CreateNew 指定的檔案已經存在時指定 <paramref name="path" />。-或-已關閉資料流。</exception>
  2579. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2580. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效,例如位在未對應的磁碟上。</exception>
  2581. <exception cref="T:System.UnauthorizedAccessException">指定之 <paramref name="access" /> 的作業系統不允許所要求的 <paramref name="path" />,例如,當 <paramref name="access" /> 為 Write 或 ReadWrite,且檔案或目錄設定為唯讀存取時。-或-<see cref="F:System.IO.FileOptions.Encrypted" /> 是指定給 <paramref name="options" />,但目前平台上不支援檔案加密。</exception>
  2582. <exception cref="T:System.IO.PathTooLongException">指定的路徑、檔案名稱或兩者都超過系統定義的最大長度。例如:在 Windows 平台上,路徑必須小於 248 字元,而檔案名稱必須小於 260 字元。</exception>
  2583. </member>
  2584. <member name="P:System.IO.FileStream.CanRead">
  2585. <summary>取得表示目前資料流是否支援讀取的值。</summary>
  2586. <returns>如果資料流支援讀取,則為 true;如果資料流已關閉或以唯寫存取開啟,則為 false。</returns>
  2587. <filterpriority>1</filterpriority>
  2588. </member>
  2589. <member name="P:System.IO.FileStream.CanSeek">
  2590. <summary>取得表示目前資料流是否支援搜尋的值。</summary>
  2591. <returns>如果資料流支援搜尋,則為 true;如果資料流已關閉或如果 FileStream 是從作業系統控制代碼 (例如管道或主控台的輸出) 建構,則為 false。</returns>
  2592. <filterpriority>2</filterpriority>
  2593. </member>
  2594. <member name="P:System.IO.FileStream.CanWrite">
  2595. <summary>取得表示目前資料流是否支援寫入的值。</summary>
  2596. <returns>如果資料流支援寫入,則為 true;如果資料流已關閉或以唯讀存取開啟,則為 false。</returns>
  2597. <filterpriority>1</filterpriority>
  2598. </member>
  2599. <member name="M:System.IO.FileStream.Dispose(System.Boolean)">
  2600. <summary>釋放 <see cref="T:System.IO.FileStream" /> 所使用的 Unmanaged 資源,並選擇性釋放 Managed 資源。</summary>
  2601. <param name="disposing">true 表示釋放 Managed 和 Unmanaged 資源,false 則表示只釋放 Unmanaged 資源。</param>
  2602. </member>
  2603. <member name="M:System.IO.FileStream.Finalize">
  2604. <summary>確認釋出資源,並在記憶體回收行程再利用 FileStream 時執行其他清除作業。</summary>
  2605. </member>
  2606. <member name="M:System.IO.FileStream.Flush">
  2607. <summary>清除這個資料流的緩衝區,讓所有緩衝資料全部寫入檔案。</summary>
  2608. <exception cref="T:System.IO.IOException">發生 I/O 錯誤。</exception>
  2609. <exception cref="T:System.ObjectDisposedException">已關閉資料流。</exception>
  2610. <filterpriority>1</filterpriority>
  2611. </member>
  2612. <member name="M:System.IO.FileStream.Flush(System.Boolean)">
  2613. <summary>清除此資料流的緩衝區,讓所有緩衝資料全部寫入檔案,同時也清除所有的中繼檔案緩衝區。</summary>
  2614. <param name="flushToDisk">true 表示排清所有中繼檔案緩衝區;否則為 false。</param>
  2615. </member>
  2616. <member name="M:System.IO.FileStream.FlushAsync(System.Threading.CancellationToken)">
  2617. <summary>以非同步的方式清除這個資料流的所有緩衝區,造成任何緩衝資料都寫入基礎裝置,並且監視取消要求。</summary>
  2618. <returns>表示非同步排清作業的工作。</returns>
  2619. <param name="cancellationToken">用來監視是否有取消要求的語彙基元。</param>
  2620. <exception cref="T:System.ObjectDisposedException">已處置資料流。</exception>
  2621. </member>
  2622. <member name="P:System.IO.FileStream.IsAsync">
  2623. <summary>取得值,指出 FileStream 為非同步或同步開啟。</summary>
  2624. <returns>如果 FileStream 是非同步開啟,則為 true,否則為 false。</returns>
  2625. <filterpriority>2</filterpriority>
  2626. </member>
  2627. <member name="P:System.IO.FileStream.Length">
  2628. <summary>取得資料流的位元組長度。</summary>
  2629. <returns>代表資料流長度的長數值 (以位元組為單位)。</returns>
  2630. <exception cref="T:System.NotSupportedException">這個資料流的 <see cref="P:System.IO.FileStream.CanSeek" /> 為 false。</exception>
  2631. <exception cref="T:System.IO.IOException">發生 I/O 錯誤,例如檔案已經關閉。</exception>
  2632. <filterpriority>1</filterpriority>
  2633. </member>
  2634. <member name="P:System.IO.FileStream.Name">
  2635. <summary>取得傳遞給建構函式的 FileStream 名稱。</summary>
  2636. <returns>FileStream 名稱的字串。</returns>
  2637. <filterpriority>1</filterpriority>
  2638. <PermissionSet>
  2639. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2640. </PermissionSet>
  2641. </member>
  2642. <member name="P:System.IO.FileStream.Position">
  2643. <summary>取得或設定這個資料流的目前位置。</summary>
  2644. <returns>這個資料流的目前位置。</returns>
  2645. <exception cref="T:System.NotSupportedException">資料流不支援搜尋。</exception>
  2646. <exception cref="T:System.IO.IOException">發生 I/O 錯誤。-或-位置設定為非常大的值,超出 Windows 98 (含) 以前版本中資料流的末端。</exception>
  2647. <exception cref="T:System.ArgumentOutOfRangeException">嘗試將位置設定為負值。</exception>
  2648. <exception cref="T:System.IO.EndOfStreamException">嘗試搜尋超出資料流長度 (不支援此)。</exception>
  2649. <filterpriority>1</filterpriority>
  2650. </member>
  2651. <member name="M:System.IO.FileStream.Read(System.Byte[],System.Int32,System.Int32)">
  2652. <summary>從資料流讀取位元組區塊,並將資料寫入指定緩衝區。</summary>
  2653. <returns>緩衝區所讀取的總位元組數。如果目前無法提供那麼多的位元組數目,則這個數目可能小於所要求的位元組數;如果已經到達資料流末端,則為零。</returns>
  2654. <param name="array">當這個方法傳回時,會包含指定的位元組陣列,這個陣列具有介於 <paramref name="offset" /> 到 (<paramref name="offset" /> + <paramref name="count" /> - 1<paramref name=")" /> 之間的值,已由讀取自目前來源的位元組所取代。</param>
  2655. <param name="offset">要在其中放置讀取位元組之 <paramref name="array" /> 的位元組位移。</param>
  2656. <param name="count">要讀取的最大位元組數。</param>
  2657. <exception cref="T:System.ArgumentNullException">
  2658. <paramref name="array" /> 為 null。</exception>
  2659. <exception cref="T:System.ArgumentOutOfRangeException">
  2660. <paramref name="offset" /> 或 <paramref name="count" /> 為負值。</exception>
  2661. <exception cref="T:System.NotSupportedException">資料流不支援讀取。</exception>
  2662. <exception cref="T:System.IO.IOException">發生 I/O 錯誤。</exception>
  2663. <exception cref="T:System.ArgumentException">
  2664. <paramref name="offset" /> 和 <paramref name="count" /> 描述 <paramref name="array" /> 中的無效範圍。</exception>
  2665. <exception cref="T:System.ObjectDisposedException">在資料流關閉後,會呼叫方法。</exception>
  2666. <filterpriority>1</filterpriority>
  2667. </member>
  2668. <member name="M:System.IO.FileStream.ReadAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
  2669. <summary>以非同步的方式從目前資料流讀取一連串的位元組、依所讀取的位元組數目進階資料流中的位置,以及監視取消要求。</summary>
  2670. <returns>表示非同步讀取作業的工作。<paramref name="TResult" /> 參數的值會包含讀取至緩衝區的位元組總數。如果目前可供使用的位元組數目少於所要求的數目,結果值可能會小於所要求的位元組數目,或者如果已經到達資料流末端,則可能為 0 (零)。</returns>
  2671. <param name="buffer">寫入資料的緩衝區。</param>
  2672. <param name="offset">開始於此處自資料流寫入資料的 <paramref name="buffer" /> 中的位元組位移。</param>
  2673. <param name="count">要讀取的最大位元組數。</param>
  2674. <param name="cancellationToken">用來監視是否有取消要求的語彙基元。</param>
  2675. <exception cref="T:System.ArgumentNullException">
  2676. <paramref name="buffer" /> 為 null。</exception>
  2677. <exception cref="T:System.ArgumentOutOfRangeException">
  2678. <paramref name="offset" /> 或 <paramref name="count" /> 為負值。</exception>
  2679. <exception cref="T:System.ArgumentException">
  2680. <paramref name="offset" /> 和 <paramref name="count" /> 的總和大於緩衝區的長度。</exception>
  2681. <exception cref="T:System.NotSupportedException">資料流不支援讀取。</exception>
  2682. <exception cref="T:System.ObjectDisposedException">已處置資料流。</exception>
  2683. <exception cref="T:System.InvalidOperationException">資料流目前由先前讀取作業所使用。</exception>
  2684. </member>
  2685. <member name="M:System.IO.FileStream.ReadByte">
  2686. <summary>從檔案讀取一個位元組,並將讀取位置前移一個位元組。</summary>
  2687. <returns>轉換為 <see cref="T:System.Int32" /> 的位元組,如果已經到達資料流的末端,則為 -1。</returns>
  2688. <exception cref="T:System.NotSupportedException">目前資料流不支援讀取。</exception>
  2689. <exception cref="T:System.ObjectDisposedException">目前的資料流已經關閉。</exception>
  2690. <filterpriority>1</filterpriority>
  2691. </member>
  2692. <member name="P:System.IO.FileStream.SafeFileHandle">
  2693. <summary>取得 <see cref="T:Microsoft.Win32.SafeHandles.SafeFileHandle" /> 物件,這個物件代表目前的 <see cref="T:System.IO.FileStream" /> 物件封裝之檔案的作業系統檔案控制代碼。</summary>
  2694. <returns>代表目前 <see cref="T:System.IO.FileStream" /> 物件封裝之檔案的作業系統檔案控制代碼的物件。</returns>
  2695. <filterpriority>1</filterpriority>
  2696. </member>
  2697. <member name="M:System.IO.FileStream.Seek(System.Int64,System.IO.SeekOrigin)">
  2698. <summary>設定這個資料流的目前位置為指定的數值。</summary>
  2699. <returns>資料流中的新位置。</returns>
  2700. <param name="offset">相對於 <paramref name="origin" /> 的搜尋起點。</param>
  2701. <param name="origin">使用 <paramref name="offset" /> 類型的值,指定開頭、結尾或目前位置做為 <see cref="T:System.IO.SeekOrigin" /> 的參考點。</param>
  2702. <exception cref="T:System.IO.IOException">發生 I/O 錯誤。</exception>
  2703. <exception cref="T:System.NotSupportedException">資料流不支援搜尋,例如,如果 FileStream 為從管道或主控台輸出所建構。</exception>
  2704. <exception cref="T:System.ArgumentException">在資料流開頭之前嘗試搜尋。</exception>
  2705. <exception cref="T:System.ObjectDisposedException">在資料流關閉後,會呼叫方法。</exception>
  2706. <filterpriority>1</filterpriority>
  2707. </member>
  2708. <member name="M:System.IO.FileStream.SetLength(System.Int64)">
  2709. <summary>設定這個資料流長度為指定的數值。</summary>
  2710. <param name="value">資料流的新長度。</param>
  2711. <exception cref="T:System.IO.IOException">發生 I/O 錯誤。</exception>
  2712. <exception cref="T:System.NotSupportedException">資料流不支援寫入和搜尋。</exception>
  2713. <exception cref="T:System.ArgumentOutOfRangeException">嘗試將 <paramref name="value" /> 參數設定為小於 0。</exception>
  2714. <filterpriority>2</filterpriority>
  2715. </member>
  2716. <member name="M:System.IO.FileStream.Write(System.Byte[],System.Int32,System.Int32)">
  2717. <summary>將位元組區塊寫入檔案資料流中。</summary>
  2718. <param name="array">包含要寫入資料流之資料的緩衝區。</param>
  2719. <param name="offset">
  2720. <paramref name="array" /> 中以零起始的位元組位移,要從其中開始將位元組複製至資料流。</param>
  2721. <param name="count">寫入的最大位元組數。</param>
  2722. <exception cref="T:System.ArgumentNullException">
  2723. <paramref name="array" /> 為 null。</exception>
  2724. <exception cref="T:System.ArgumentException">
  2725. <paramref name="offset" /> 和 <paramref name="count" /> 描述 <paramref name="array" /> 中的無效範圍。</exception>
  2726. <exception cref="T:System.ArgumentOutOfRangeException">
  2727. <paramref name="offset" /> 或 <paramref name="count" /> 為負值。</exception>
  2728. <exception cref="T:System.IO.IOException">發生 I/O 錯誤。-或-其他執行緒可能導致作業系統之檔案控制代碼的位置發生非預期的變更。</exception>
  2729. <exception cref="T:System.ObjectDisposedException">已關閉資料流。</exception>
  2730. <exception cref="T:System.NotSupportedException">目前的資料流執行個體不支援寫入。</exception>
  2731. <filterpriority>1</filterpriority>
  2732. </member>
  2733. <member name="M:System.IO.FileStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
  2734. <summary>以非同步的方式將一連串的位元組寫入目前的資料流,由這個資料流中目前的位置前移寫入的位元組數目,並且監視取消要求。</summary>
  2735. <returns>表示非同步寫入作業的工作。</returns>
  2736. <param name="buffer">寫入資料的來源緩衝區。</param>
  2737. <param name="offset">
  2738. <paramref name="buffer" /> 中以零起始的位元組位移,要從其中開始將位元組複製至資料流。</param>
  2739. <param name="count">寫入的最大位元組數。</param>
  2740. <param name="cancellationToken">用來監視是否有取消要求的語彙基元。</param>
  2741. <exception cref="T:System.ArgumentNullException">
  2742. <paramref name="buffer" /> 為 null。</exception>
  2743. <exception cref="T:System.ArgumentOutOfRangeException">
  2744. <paramref name="offset" /> 或 <paramref name="count" /> 為負值。</exception>
  2745. <exception cref="T:System.ArgumentException">
  2746. <paramref name="offset" /> 和 <paramref name="count" /> 的總和大於緩衝區的長度。</exception>
  2747. <exception cref="T:System.NotSupportedException">資料流不支援寫入。</exception>
  2748. <exception cref="T:System.ObjectDisposedException">已處置資料流。</exception>
  2749. <exception cref="T:System.InvalidOperationException">資料流目前由先前寫入作業所使用。</exception>
  2750. </member>
  2751. <member name="M:System.IO.FileStream.WriteByte(System.Byte)">
  2752. <summary>寫入一個位元組到檔案資料流中的目前位置。</summary>
  2753. <param name="value">要寫入資料流的位元組。</param>
  2754. <exception cref="T:System.ObjectDisposedException">已關閉資料流。</exception>
  2755. <exception cref="T:System.NotSupportedException">資料流不支援寫入。</exception>
  2756. <filterpriority>1</filterpriority>
  2757. </member>
  2758. <member name="T:System.IO.FileSystemInfo">
  2759. <summary>為 <see cref="T:System.IO.FileInfo" /> 和 <see cref="T:System.IO.DirectoryInfo" /> 物件提供基底類別。</summary>
  2760. <filterpriority>2</filterpriority>
  2761. </member>
  2762. <member name="M:System.IO.FileSystemInfo.#ctor">
  2763. <summary>初始化 <see cref="T:System.IO.FileSystemInfo" /> 類別的新執行個體。</summary>
  2764. </member>
  2765. <member name="P:System.IO.FileSystemInfo.Attributes">
  2766. <summary>取得或設定目前檔案或目錄的屬性。</summary>
  2767. <returns>目前 <see cref="T:System.IO.FileSystemInfo" /> 的 <see cref="T:System.IO.FileAttributes" />。</returns>
  2768. <exception cref="T:System.IO.FileNotFoundException">指定的檔案不存在。</exception>
  2769. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效;例如,位於未對應的磁碟上。</exception>
  2770. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2771. <exception cref="T:System.ArgumentException">呼叫端嘗試設定無效的檔案屬性 (Attribute)。-或-使用者嘗試設定屬性值,但並沒有寫入權限。</exception>
  2772. <exception cref="T:System.IO.IOException">
  2773. <see cref="M:System.IO.FileSystemInfo.Refresh" /> 無法初始化資料。</exception>
  2774. <filterpriority>1</filterpriority>
  2775. <PermissionSet>
  2776. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2777. </PermissionSet>
  2778. </member>
  2779. <member name="P:System.IO.FileSystemInfo.CreationTime">
  2780. <summary>取得或設定目前檔案或目錄的建立時間。</summary>
  2781. <returns>目前的 <see cref="T:System.IO.FileSystemInfo" /> 物件的建立日期和時間。</returns>
  2782. <exception cref="T:System.IO.IOException">
  2783. <see cref="M:System.IO.FileSystemInfo.Refresh" /> 無法初始化資料。</exception>
  2784. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效;例如,位於未對應的磁碟上。</exception>
  2785. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  2786. <exception cref="T:System.ArgumentOutOfRangeException">呼叫端嘗試設定無效的建立時間。</exception>
  2787. <filterpriority>1</filterpriority>
  2788. <PermissionSet>
  2789. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2790. </PermissionSet>
  2791. </member>
  2792. <member name="P:System.IO.FileSystemInfo.CreationTimeUtc">
  2793. <summary>取得或設定目前檔案或目錄的建立時間,其格式為國際標準時間 (Coordinated Universal Time,UTC)。</summary>
  2794. <returns>目前 <see cref="T:System.IO.FileSystemInfo" /> 物件以 UTC 格式表示的建立日期和時間。</returns>
  2795. <exception cref="T:System.IO.IOException">
  2796. <see cref="M:System.IO.FileSystemInfo.Refresh" /> 無法初始化資料。</exception>
  2797. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效;例如,位於未對應的磁碟上。</exception>
  2798. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  2799. <exception cref="T:System.ArgumentOutOfRangeException">呼叫端嘗試設定無效的存取時間。</exception>
  2800. <filterpriority>1</filterpriority>
  2801. <PermissionSet>
  2802. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2803. </PermissionSet>
  2804. </member>
  2805. <member name="M:System.IO.FileSystemInfo.Delete">
  2806. <summary>刪除檔案或目錄。</summary>
  2807. <exception cref="T:System.IO.DirectoryNotFoundException">指定的路徑無效;例如,位於未對應的磁碟上。</exception>
  2808. <exception cref="T:System.IO.IOException">此檔案或目錄具有開啟控制代碼,而且作業系統是 Windows XP 或先前的版本。這個開啟控制代碼可能是列舉目錄和檔案所產生。如需詳細資訊,請參閱如何:列舉目錄和檔案。</exception>
  2809. <filterpriority>2</filterpriority>
  2810. </member>
  2811. <member name="P:System.IO.FileSystemInfo.Exists">
  2812. <summary>取得值,表示檔案或目錄是否存在。</summary>
  2813. <returns>如果檔案或目錄存在,則為 true,否則為 false。</returns>
  2814. <filterpriority>1</filterpriority>
  2815. </member>
  2816. <member name="P:System.IO.FileSystemInfo.Extension">
  2817. <summary>取得字串,代表檔案的副檔名部分。</summary>
  2818. <returns>字串,含有 <see cref="T:System.IO.FileSystemInfo" /> 副檔名。</returns>
  2819. <filterpriority>1</filterpriority>
  2820. </member>
  2821. <member name="P:System.IO.FileSystemInfo.FullName">
  2822. <summary>取得目錄或檔案的完整路徑。</summary>
  2823. <returns>含有完整路徑的字串。</returns>
  2824. <exception cref="T:System.IO.PathTooLongException">完整路徑和檔案名稱是 260 個以上的字元。</exception>
  2825. <exception cref="T:System.Security.SecurityException">呼叫端沒有必要的權限。</exception>
  2826. <filterpriority>1</filterpriority>
  2827. <PermissionSet>
  2828. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2829. </PermissionSet>
  2830. </member>
  2831. <member name="F:System.IO.FileSystemInfo.FullPath">
  2832. <summary>代表目錄或檔案的完整路徑。</summary>
  2833. <exception cref="T:System.IO.PathTooLongException">完整路徑是 260 個以上的字元。</exception>
  2834. </member>
  2835. <member name="P:System.IO.FileSystemInfo.LastAccessTime">
  2836. <summary>取得或設定上次存取目前檔案或目錄的時間。</summary>
  2837. <returns>上次存取目前檔案或目錄的時間。</returns>
  2838. <exception cref="T:System.IO.IOException">
  2839. <see cref="M:System.IO.FileSystemInfo.Refresh" /> 無法初始化資料。</exception>
  2840. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  2841. <exception cref="T:System.ArgumentOutOfRangeException">呼叫端嘗試設定無效的存取時間</exception>
  2842. <filterpriority>1</filterpriority>
  2843. <PermissionSet>
  2844. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2845. </PermissionSet>
  2846. </member>
  2847. <member name="P:System.IO.FileSystemInfo.LastAccessTimeUtc">
  2848. <summary>取得或設定目前檔案或目錄上次被存取的時間,其格式為 Coordinated Universal Time (UTC)。</summary>
  2849. <returns>目前檔案或目錄上次被存取的 UTC 時間。</returns>
  2850. <exception cref="T:System.IO.IOException">
  2851. <see cref="M:System.IO.FileSystemInfo.Refresh" /> 無法初始化資料。</exception>
  2852. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  2853. <exception cref="T:System.ArgumentOutOfRangeException">呼叫端嘗試設定無效的存取時間。</exception>
  2854. <filterpriority>1</filterpriority>
  2855. <PermissionSet>
  2856. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2857. </PermissionSet>
  2858. </member>
  2859. <member name="P:System.IO.FileSystemInfo.LastWriteTime">
  2860. <summary>取得或設定上次寫入目前檔案或目錄的時間。</summary>
  2861. <returns>上次寫入目前檔案的時間。</returns>
  2862. <exception cref="T:System.IO.IOException">
  2863. <see cref="M:System.IO.FileSystemInfo.Refresh" /> 無法初始化資料。</exception>
  2864. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  2865. <exception cref="T:System.ArgumentOutOfRangeException">呼叫端嘗試設定無效的寫入時間。</exception>
  2866. <filterpriority>1</filterpriority>
  2867. <PermissionSet>
  2868. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2869. </PermissionSet>
  2870. </member>
  2871. <member name="P:System.IO.FileSystemInfo.LastWriteTimeUtc">
  2872. <summary>取得或設定目前檔案或目錄上次被寫入的時間,其格式為 Coordinated Universal Time (UTC)。</summary>
  2873. <returns>目前檔案上次被寫入的 UTC 時間。</returns>
  2874. <exception cref="T:System.IO.IOException">
  2875. <see cref="M:System.IO.FileSystemInfo.Refresh" /> 無法初始化資料。</exception>
  2876. <exception cref="T:System.PlatformNotSupportedException">目前的作業系統不是 Windows NT (含) 以後版本。</exception>
  2877. <exception cref="T:System.ArgumentOutOfRangeException">呼叫端嘗試設定無效的寫入時間。</exception>
  2878. <filterpriority>1</filterpriority>
  2879. <PermissionSet>
  2880. <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
  2881. </PermissionSet>
  2882. </member>
  2883. <member name="P:System.IO.FileSystemInfo.Name">
  2884. <summary>對於檔案,取得檔案的名稱。對於目錄,如果有階層架構,則是取得階層架構中最後一個目錄的名稱。否則,Name 屬性會取得目錄的名稱。</summary>
  2885. <returns>字串,可以是父代 (Parent) 目錄的名稱、階層架構中最後一個目錄的名稱,或者包括副檔名在內的檔案名稱。</returns>
  2886. <filterpriority>1</filterpriority>
  2887. </member>
  2888. <member name="F:System.IO.FileSystemInfo.OriginalPath">
  2889. <summary>使用者指定的相對或絕對的原始路徑。</summary>
  2890. </member>
  2891. <member name="M:System.IO.FileSystemInfo.Refresh">
  2892. <summary>重新整理物件的狀態。</summary>
  2893. <exception cref="T:System.IO.IOException">裝置 (例如,磁碟機) 未就緒。 </exception>
  2894. <filterpriority>1</filterpriority>
  2895. </member>
  2896. <member name="T:System.IO.SearchOption">
  2897. <summary>指定要搜尋目前目錄,還是要搜尋目前目錄和所有子目錄。</summary>
  2898. </member>
  2899. <member name="F:System.IO.SearchOption.AllDirectories">
  2900. <summary>在搜尋作業中包含目前目錄和所有其子目錄。這個選項會在搜尋中包含重新剖析點 (例如掛接磁碟和符號連結)。</summary>
  2901. </member>
  2902. <member name="F:System.IO.SearchOption.TopDirectoryOnly">
  2903. <summary>只在搜尋作業中包含目前目錄。</summary>
  2904. </member>
  2905. </members>
  2906. </doc>