FileInfoTest.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. // FileInfoTest.cs - NUnit Test Cases for System.IO.FileInfo class
  2. //
  3. // Ville Palo ([email protected])
  4. //
  5. // (C) 2003 Ville Palo
  6. //
  7. using NUnit.Framework;
  8. using System;
  9. using System.IO;
  10. namespace MonoTests.System.IO
  11. {
  12. [TestFixture]
  13. public class FileInfoTest : Assertion
  14. {
  15. string TempFolder = Path.Combine (Path.GetTempPath (), "MonoTests.System.IO.Tests");
  16. static readonly char DSC = Path.DirectorySeparatorChar;
  17. [SetUp]
  18. protected void SetUp() {
  19. if (Directory.Exists (TempFolder))
  20. Directory.Delete (TempFolder, true);
  21. Directory.CreateDirectory (TempFolder);
  22. }
  23. [TearDown]
  24. protected void TearDown() {
  25. if (Directory.Exists (TempFolder))
  26. Directory.Delete (TempFolder, true);
  27. }
  28. [Test]
  29. public void Ctr ()
  30. {
  31. string path = TempFolder + DSC + "FIT.Ctr.Test";
  32. DeleteFile (path);
  33. FileInfo info = new FileInfo (path);
  34. AssertEquals ("test#01", true, info.DirectoryName.EndsWith (".Tests"));
  35. AssertEquals ("test#02", false, info.Exists);
  36. AssertEquals ("test#03", ".Test", info.Extension);
  37. AssertEquals ("test#05", "FIT.Ctr.Test", info.Name);
  38. }
  39. [Test]
  40. [ExpectedException(typeof(ArgumentNullException))]
  41. public void CtorArgumentNullException ()
  42. {
  43. FileInfo info = new FileInfo (null);
  44. }
  45. [Test]
  46. [ExpectedException(typeof(ArgumentException))]
  47. public void CtorArgumentException1 ()
  48. {
  49. FileInfo info = new FileInfo ("");
  50. }
  51. [Test]
  52. [ExpectedException(typeof(ArgumentException))]
  53. public void CtorArgumentException2 ()
  54. {
  55. FileInfo info = new FileInfo (" ");
  56. }
  57. [Test]
  58. [ExpectedException(typeof(ArgumentException))]
  59. public void CtorArgumentException3 ()
  60. {
  61. string path = "";
  62. foreach (char c in Path.InvalidPathChars) {
  63. path += c;
  64. }
  65. FileInfo info = new FileInfo (path);
  66. }
  67. [Test]
  68. public void DirectoryTest ()
  69. {
  70. string path = TempFolder + DSC + "FIT.Directory.Test";
  71. DeleteFile (path);
  72. FileInfo info = new FileInfo (path);
  73. DirectoryInfo dir = info.Directory;
  74. AssertEquals ("test#01", "MonoTests.System.IO.Tests", dir.Name);
  75. }
  76. [Test]
  77. public void Exists ()
  78. {
  79. string path = TempFolder + DSC + "FIT.Exists.Test";
  80. DeleteFile (path);
  81. try {
  82. FileInfo info = new FileInfo (path);
  83. AssertEquals ("test#01", false, info.Exists);
  84. File.Create (path).Close ();
  85. AssertEquals ("test#02", false, info.Exists);
  86. info = new FileInfo (path);
  87. AssertEquals ("test#03", true, info.Exists);
  88. } finally {
  89. DeleteFile (path);
  90. }
  91. }
  92. [Test]
  93. public void Length ()
  94. {
  95. string path = TempFolder + DSC + "FIT.Length.Test";
  96. DeleteFile (path);
  97. try {
  98. FileStream stream = File.Create (path);
  99. FileInfo info = new FileInfo (path);
  100. AssertEquals ("test#01", 0, info.Length);
  101. stream.WriteByte (12);
  102. stream.Flush ();
  103. AssertEquals ("test#02", 0, info.Length);
  104. info = new FileInfo (path);
  105. AssertEquals ("test#03", 1, info.Length);
  106. stream.Close ();
  107. } finally {
  108. DeleteFile (path);
  109. }
  110. }
  111. [Test]
  112. [ExpectedException (typeof (FileNotFoundException))]
  113. public void LengthException ()
  114. {
  115. string path = TempFolder + DSC + "FIT.LengthException.Test";
  116. DeleteFile (path);
  117. FileInfo info = new FileInfo (path);
  118. long l = info.Length;
  119. }
  120. [Test]
  121. public void AppendText ()
  122. {
  123. string path = TempFolder + DSC + "FIT.AppendText.Test";
  124. DeleteFile (path);
  125. try {
  126. FileInfo info = new FileInfo (path);
  127. AssertEquals ("test#01", false, info.Exists);
  128. StreamWriter writer = info.AppendText ();
  129. info = new FileInfo (path);
  130. AssertEquals ("test#02", true, info.Exists );
  131. writer.Write ("aaa");
  132. writer.Flush ();
  133. writer.Close ();
  134. AssertEquals ("test#03", 0, info.Length);
  135. info = new FileInfo (path);
  136. AssertEquals ("test#04", 3, info.Length);
  137. } finally {
  138. DeleteFile (path);
  139. }
  140. }
  141. [Test]
  142. public void CopyTo ()
  143. {
  144. string path1 = TempFolder + DSC + "FIT.CopyTo.Source.Test";
  145. string path2 = TempFolder + DSC + "FIT.CopyTo.Dest.Test";
  146. DeleteFile (path1);
  147. DeleteFile (path2);
  148. try {
  149. File.Create (path1).Close ();
  150. FileInfo info = new FileInfo (path1);
  151. AssertEquals ("test#01", true, info.Exists);
  152. FileInfo info2 = info.CopyTo (path2);
  153. info = new FileInfo (path1);
  154. AssertEquals ("test#02", true, info2.Exists);
  155. } finally {
  156. DeleteFile (path1);
  157. DeleteFile (path2);
  158. }
  159. }
  160. [Test]
  161. public void CopyTo2 ()
  162. {
  163. string path1 = TempFolder + DSC + "FIT.CopyTo2.Source.Test";
  164. string path2 = TempFolder + DSC + "FIT.CopyTo2.Dest.Test";
  165. DeleteFile (path1);
  166. DeleteFile (path2);
  167. try {
  168. File.Create (path1).Close ();
  169. File.Create (path2).Close ();
  170. FileInfo info = new FileInfo (path1);
  171. FileInfo info2 = info.CopyTo (path2, true);
  172. info = new FileInfo (path1);
  173. AssertEquals ("test#01", true, info.Exists);
  174. AssertEquals ("test#02", true, info2.Exists);
  175. } finally {
  176. DeleteFile (path1);
  177. DeleteFile (path2);
  178. }
  179. }
  180. [Test]
  181. [ExpectedException (typeof (IOException))]
  182. public void CopyToIOException ()
  183. {
  184. string path1 = TempFolder + DSC + "FIT.CopyToException.Source.Test";
  185. string path2 = TempFolder + DSC + "FIT.CopyToException.Dest.Test";
  186. try {
  187. DeleteFile (path1);
  188. DeleteFile (path2);
  189. File.Create (path1).Close ();
  190. File.Create (path2).Close ();
  191. FileInfo info = new FileInfo (path1);
  192. FileInfo info2 = info.CopyTo (path2);
  193. } finally {
  194. DeleteFile (path1);
  195. DeleteFile (path2);
  196. }
  197. }
  198. [Test]
  199. [ExpectedException (typeof (IOException))]
  200. public void CopyToIOException2 ()
  201. {
  202. string path1 = TempFolder + DSC + "FIT.CopyToException.Source.Test";
  203. string path2 = TempFolder + DSC + "FIT.CopyToException.Dest.Test";
  204. try {
  205. DeleteFile (path1);
  206. DeleteFile (path2);
  207. File.Create (path1).Close ();
  208. File.Create (path2).Close ();
  209. FileInfo info = new FileInfo (path1);
  210. FileInfo info2 = info.CopyTo (path2, false);
  211. } finally {
  212. DeleteFile (path1);
  213. DeleteFile (path2);
  214. }
  215. }
  216. [Test]
  217. [ExpectedException (typeof (ArgumentNullException))]
  218. public void CopyToArgumentNullException ()
  219. {
  220. string path = TempFolder + DSC + "FIT.CopyToArgumentNullException.Test";
  221. DeleteFile (path);
  222. try {
  223. File.Create (path).Close ();
  224. FileInfo info = new FileInfo (path);
  225. info.CopyTo (null, false);
  226. } finally {
  227. DeleteFile (path);
  228. }
  229. }
  230. [Test]
  231. [ExpectedException (typeof (ArgumentException))]
  232. public void CopyToArgumentException1 ()
  233. {
  234. string path = TempFolder + DSC + "FIT.CopyToArgument1Exception.Test";
  235. DeleteFile (path);
  236. try {
  237. File.Create (path).Close ();
  238. FileInfo info = new FileInfo (path);
  239. info.CopyTo ("", false);
  240. } finally {
  241. DeleteFile (path);
  242. }
  243. }
  244. [Test]
  245. [ExpectedException (typeof (ArgumentException))]
  246. public void CopyToArgumentException2 ()
  247. {
  248. string path = TempFolder + DSC + "FIT.CopyToArgument2Exception.Test";
  249. DeleteFile (path);
  250. try {
  251. File.Create (path).Close ();
  252. FileInfo info = new FileInfo (path);
  253. info.CopyTo (" ", false);
  254. } finally {
  255. DeleteFile (path);
  256. }
  257. }
  258. [Test]
  259. [ExpectedException (typeof (ArgumentException))]
  260. public void CopyToArgumentException3 ()
  261. {
  262. string path = TempFolder + DSC + "FIT.CopyToArgument3Exception.Test";
  263. DeleteFile (path);
  264. try {
  265. File.Create (path).Close ();
  266. FileInfo info = new FileInfo (path);
  267. info.CopyTo (" ", false);
  268. } finally {
  269. DeleteFile (path);
  270. }
  271. }
  272. [Test]
  273. [ExpectedException (typeof (ArgumentException))]
  274. public void CopyToArgumentException4 ()
  275. {
  276. string path = TempFolder + DSC + "FIT.CopyToArgument4Exception.Test";
  277. string path2 = "";
  278. DeleteFile (path);
  279. try {
  280. File.Create (path).Close ();
  281. FileInfo info = new FileInfo (path);
  282. foreach (char c in Path.InvalidPathChars) {
  283. path2 += c;
  284. }
  285. info.CopyTo (path2, false);
  286. } finally {
  287. DeleteFile (path);
  288. }
  289. }
  290. [Test]
  291. public void Create ()
  292. {
  293. string path = TempFolder + DSC + "FIT.Create.Test";
  294. DeleteFile (path);
  295. try {
  296. FileInfo info = new FileInfo (path);
  297. AssertEquals ("test#01", false, info.Exists);
  298. FileStream stream = info.Create ();
  299. AssertEquals ("test#02", false, info.Exists);
  300. info = new FileInfo (path);
  301. AssertEquals ("test#03", true, info.Exists);
  302. AssertEquals ("test#04", true, stream.CanRead);
  303. AssertEquals ("test#05", true, stream.CanWrite);
  304. AssertEquals ("test#06", true, stream.CanSeek);
  305. stream.Close ();
  306. } finally {
  307. DeleteFile (path);
  308. }
  309. }
  310. [Test]
  311. public void CreateText ()
  312. {
  313. string path = TempFolder + DSC + "FIT.CreateText.Test";
  314. DeleteFile (path);
  315. try {
  316. FileInfo info = new FileInfo (path);
  317. AssertEquals ("test#01", false, info.Exists);
  318. StreamWriter writer = info.CreateText ();
  319. writer.WriteLine ("test");
  320. writer.Close ();
  321. info = new FileInfo (path);
  322. AssertEquals ("test#02", true, info.Exists);
  323. } finally {
  324. DeleteFile (path);
  325. }
  326. }
  327. [Test]
  328. [ExpectedException (typeof (UnauthorizedAccessException))]
  329. public void CreateTextUnauthorizedAccessException ()
  330. {
  331. string path = TempFolder;
  332. FileInfo info = new FileInfo (path);
  333. AssertEquals ("test#01", false, info.Exists);
  334. StreamWriter writer = info.CreateText ();
  335. }
  336. [Test]
  337. public void Delete ()
  338. {
  339. string path = TempFolder + DSC + "FIT.Delete.Test";
  340. DeleteFile (path);
  341. try {
  342. FileInfo info = new FileInfo (path);
  343. AssertEquals ("test#01", false, info.Exists);
  344. info.Create ().Close ();
  345. info = new FileInfo (path);
  346. AssertEquals ("test#02", true, info.Exists);
  347. info.Delete ();
  348. AssertEquals ("test#03", true, info.Exists);
  349. info = new FileInfo (path);
  350. AssertEquals ("test#04", false, info.Exists);
  351. } finally {
  352. DeleteFile (path);
  353. }
  354. }
  355. [Test]
  356. [ExpectedException (typeof (UnauthorizedAccessException))]
  357. public void DeleteUnauthorizedAccessException ()
  358. {
  359. string path = TempFolder;
  360. FileInfo info = new FileInfo (path);
  361. info.Delete ();
  362. }
  363. [Test]
  364. public void MoveTo ()
  365. {
  366. string path1 = TempFolder + DSC + "FIT.MoveTo.Source.Test";
  367. string path2 = TempFolder + DSC + "FIT.MoveTo.Dest.Test";
  368. DeleteFile (path1);
  369. DeleteFile (path2);
  370. try {
  371. File.Create (path1).Close ();
  372. FileInfo info = new FileInfo (path1);
  373. FileInfo info2 = new FileInfo (path2);
  374. AssertEquals ("test#01", false, info2.Exists);
  375. info.MoveTo (path2);
  376. info2 = new FileInfo (path2);
  377. AssertEquals ("test#02", true, info2.Exists);
  378. } finally {
  379. DeleteFile (path1);
  380. DeleteFile (path2);
  381. }
  382. }
  383. [Test]
  384. [ExpectedException (typeof (IOException))]
  385. public void MoveToIOException ()
  386. {
  387. string path1 = TempFolder + DSC + "FIT.MoveToIOException.Source.Test";
  388. string path2 = TempFolder + DSC + "FIT.MoveToIOException.Dest.Test";
  389. DeleteFile (path1);
  390. DeleteFile (path2);
  391. try {
  392. File.Create (path1).Close ();
  393. File.Create (path2).Close ();
  394. FileInfo info = new FileInfo (path1);
  395. info.MoveTo (path2);
  396. } finally {
  397. DeleteFile (path1);
  398. DeleteFile (path2);
  399. }
  400. }
  401. [Test]
  402. [ExpectedException (typeof (ArgumentNullException))]
  403. public void MoveToArgumentNullException ()
  404. {
  405. string path = TempFolder + DSC + "FIT.MoveToArgumentNullException.Test";
  406. DeleteFile (path);
  407. try {
  408. File.Create (path).Close ();
  409. FileInfo info = new FileInfo (path);
  410. info.MoveTo (null);
  411. } finally {
  412. DeleteFile (path);
  413. }
  414. }
  415. [Test]
  416. [ExpectedException (typeof (ArgumentException))]
  417. public void MoveToArgumentException ()
  418. {
  419. string path = TempFolder + DSC + "FIT.MoveToArgumentException.Test";
  420. DeleteFile (path);
  421. try {
  422. File.Create (path).Close ();
  423. FileInfo info = new FileInfo (path);
  424. info.MoveTo (" ");
  425. } finally {
  426. DeleteFile (path);
  427. }
  428. }
  429. /// <summary>
  430. /// msdn says this should throw UnauthorizedAccessException, byt
  431. /// it throws IOException.
  432. /// </summary>
  433. [Test]
  434. [ExpectedException (typeof (IOException))]
  435. public void MoveToUnauthorizedAccessException ()
  436. {
  437. string path = TempFolder + DSC + "FIT.UnauthorizedAccessException.Test";
  438. DeleteFile (path);
  439. try {
  440. File.Create (path).Close ();
  441. FileInfo info = new FileInfo (path);
  442. info.MoveTo (TempFolder);
  443. } finally {
  444. DeleteFile (path);
  445. }
  446. }
  447. [Test]
  448. [ExpectedException (typeof (FileNotFoundException))]
  449. public void MoveToFileNotFoundException ()
  450. {
  451. string path1 = TempFolder + DSC + "FIT.MoveToFileNotFoundException.Src";
  452. string path2 = TempFolder + DSC + "FIT.MoveToFileNotFoundException.Dst";
  453. DeleteFile (path1);
  454. DeleteFile (path2);
  455. try {
  456. FileInfo info = new FileInfo (path1);
  457. info.MoveTo (path2);
  458. } finally {
  459. DeleteFile (path1);
  460. DeleteFile (path2);
  461. }
  462. }
  463. [Test]
  464. public void Open ()
  465. {
  466. string path = TempFolder + DSC + "FIT.Open.Test";
  467. DeleteFile (path);
  468. FileStream stream = null;
  469. try {
  470. FileInfo info = new FileInfo (path);
  471. stream = info.Open (FileMode.CreateNew);
  472. AssertEquals ("test#01", true, stream.CanRead);
  473. AssertEquals ("test#02", true, stream.CanSeek);
  474. AssertEquals ("test#03", true, stream.CanWrite);
  475. stream.Close ();
  476. stream = info.Open (FileMode.Open);
  477. AssertEquals ("test#04", true, stream.CanRead);
  478. AssertEquals ("test#05", true, stream.CanSeek);
  479. AssertEquals ("test#06", true, stream.CanWrite);
  480. stream.Close ();
  481. stream = info.Open (FileMode.Append, FileAccess.Write);
  482. AssertEquals ("test#07", false, stream.CanRead);
  483. AssertEquals ("test#08", true, stream.CanSeek);
  484. AssertEquals ("test#09", true, stream.CanWrite);
  485. stream.Close ();
  486. stream = info.Open (FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
  487. AssertEquals ("test#10", true, stream.CanRead);
  488. AssertEquals ("test#11", true, stream.CanSeek);
  489. AssertEquals ("test#12", true, stream.CanWrite);
  490. stream.Close ();
  491. } finally {
  492. if (stream != null)
  493. stream.Close ();
  494. DeleteFile (path);
  495. }
  496. }
  497. [Test]
  498. [ExpectedException(typeof(FileNotFoundException))]
  499. public void OpenFileNotFoundException ()
  500. {
  501. string path = TempFolder + DSC + "FIT.OpenFileNotFoundException.Test";
  502. DeleteFile (path);
  503. FileInfo info = new FileInfo (path);
  504. info.Open (FileMode.Open);
  505. }
  506. [Test]
  507. public void OpenRead ()
  508. {
  509. string path = TempFolder + DSC + "FIT.OpenRead.Test";
  510. DeleteFile (path);
  511. FileStream stream = null;
  512. try {
  513. File.Create (path).Close ();
  514. FileInfo info = new FileInfo (path);
  515. stream = info.OpenRead ();
  516. AssertEquals ("test#01", true, stream.CanRead);
  517. AssertEquals ("test#02", true, stream.CanSeek);
  518. AssertEquals ("test#03", false, stream.CanWrite);
  519. stream.Close ();
  520. } finally {
  521. if (stream != null)
  522. stream.Close ();
  523. DeleteFile (path);
  524. }
  525. }
  526. [Test]
  527. [ExpectedException(typeof (IOException))]
  528. public void OpenReadIOException ()
  529. {
  530. string path = TempFolder + DSC + "FIT.OpenReadIOException.Test";
  531. DeleteFile (path);
  532. FileStream stream = null;
  533. try {
  534. stream = File.Create (path);
  535. FileInfo info = new FileInfo (path);
  536. info.OpenRead ();
  537. } finally {
  538. if (stream != null)
  539. stream.Close ();
  540. DeleteFile (path);
  541. }
  542. }
  543. [Test]
  544. [ExpectedException(typeof (UnauthorizedAccessException))]
  545. public void OpenReadUnauthorizedAccessException ()
  546. {
  547. string path = TempFolder;
  548. FileInfo info = new FileInfo (path);
  549. info.OpenRead ();
  550. }
  551. [Test]
  552. public void OpenText ()
  553. {
  554. string path = TempFolder + DSC + "FIT.OpenText.Test";
  555. DeleteFile (path);
  556. StreamReader reader = null;
  557. try {
  558. File.Create (path).Close ();
  559. FileInfo info = new FileInfo (path);
  560. reader = info.OpenText ();
  561. AssertEquals ("test#01", -1, reader.Peek ());
  562. } finally {
  563. if (reader != null)
  564. reader.Close ();
  565. DeleteFile (path);
  566. }
  567. }
  568. [Test]
  569. [ExpectedException(typeof (FileNotFoundException))]
  570. public void OpenTextFileNotFoundException ()
  571. {
  572. string path = TempFolder + DSC + "FIT.OpenTextFileNotFoundException.Test";
  573. DeleteFile (path);
  574. FileInfo info = new FileInfo (path);
  575. info.OpenText ();
  576. }
  577. [Test]
  578. [ExpectedException(typeof (UnauthorizedAccessException))]
  579. public void OpenTextUnauthorizedAccessException ()
  580. {
  581. string path = TempFolder;
  582. FileInfo info = new FileInfo (path);
  583. info.OpenText ();
  584. }
  585. [Test]
  586. public void OpenWrite ()
  587. {
  588. string path = TempFolder + DSC + "FIT.OpenWrite.Test";
  589. DeleteFile (path);
  590. FileStream stream = null;
  591. try {
  592. File.Create (path).Close ();
  593. FileInfo info = new FileInfo (path);
  594. stream = info.OpenWrite ();
  595. AssertEquals ("test#01", false, stream.CanRead);
  596. AssertEquals ("test#02", true, stream.CanSeek);
  597. AssertEquals ("test#03", true, stream.CanWrite);
  598. } finally {
  599. if (stream != null)
  600. stream.Close ();
  601. DeleteFile (path);
  602. }
  603. }
  604. [Test]
  605. [ExpectedException(typeof (UnauthorizedAccessException))]
  606. public void OpenWriteUnauthorizedAccessException ()
  607. {
  608. string path = TempFolder;
  609. FileInfo info = new FileInfo (path);
  610. info.OpenWrite ();
  611. }
  612. private void DeleteFile (string path)
  613. {
  614. if (File.Exists (path))
  615. File.Delete (path);
  616. }
  617. [Test]
  618. public void ToStringVariety ()
  619. {
  620. AssertEquals ("foo", new FileInfo ("foo").ToString ());
  621. AssertEquals ("c:/foo", new FileInfo ("c:/foo").ToString ());
  622. AssertEquals ("/usr/local/foo", new FileInfo ("/usr/local/foo").ToString ());
  623. AssertEquals ("c:\\foo", new FileInfo ("c:\\foo").ToString ());
  624. AssertEquals ("/usr/local\\foo", new FileInfo ("/usr/local\\foo").ToString ());
  625. AssertEquals ("foo/BAR/baz", new FileInfo ("foo/BAR/baz").ToString ());
  626. AssertEquals ("c:/documents and settings", new FileInfo ("c:/documents and settings").ToString ());
  627. AssertEquals ("c:/docUme~1", new FileInfo ("c:/docUme~1").ToString ());
  628. }
  629. }
  630. }