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.

System.IO.FileSystem.xml 262 KiB

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