FileInfo.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. //------------------------------------------------------------------------------
  2. //
  3. // System.IO.FileInfo.cs
  4. //
  5. // Copyright (C) 2001 Moonlight Enterprises, All Rights Reserved
  6. //
  7. // Author: Jim Richardson, [email protected]
  8. // Created: Monday, August 13, 2001
  9. //
  10. //------------------------------------------------------------------------------
  11. using System;
  12. namespace System.IO
  13. {
  14. /// <summary>
  15. ///
  16. /// </summary>
  17. public sealed class FileInfo : FileSystemInfo
  18. {
  19. public FileInfo()
  20. {
  21. //
  22. // TODO: Add constructor logic here
  23. //
  24. }
  25. public override bool Exists
  26. {
  27. get
  28. {
  29. return false;
  30. }
  31. }
  32. public override string Name
  33. {
  34. get
  35. { //TODO: Implement this as per the documenation
  36. return FullPath;
  37. }
  38. }
  39. /// <summary>
  40. /// Gets the parent directory info
  41. /// </summary>
  42. public DirectoryInfo Directory
  43. {
  44. get
  45. {
  46. return null;
  47. }
  48. }
  49. /// <summary>
  50. /// Get the path of the file
  51. /// </summary>
  52. public string DirectoryName
  53. {
  54. get
  55. {
  56. return null;
  57. }
  58. }
  59. /// <summary>
  60. /// Get the length of the file
  61. /// </summary>
  62. public long Length
  63. {
  64. get
  65. {
  66. return 0;
  67. }
  68. }
  69. /* TODO: Uncomment / implement as classes become available
  70. public StreamWriter AppendText()
  71. {
  72. }
  73. public FileStream Create()
  74. {
  75. return null;
  76. }
  77. public StreamWriter CreateText()
  78. {
  79. return null;
  80. }
  81. public FileStream Open(FileMode mode)
  82. {
  83. return Open(mode, FileAccess.ReadWrite);
  84. }
  85. public FileStream Open(FileMode mode, FileAccess access)
  86. {
  87. return Open(mode, access, FileShare.None);
  88. }
  89. public FileStream Open(FileMode mode, FileAccess access, FileShare share)
  90. {
  91. return null;
  92. }
  93. public FileStream OpenRead()
  94. { // TODO: find out what default share should be
  95. return Open(FileMode.Open, FileAccess.Read, FileShare.Read);
  96. }
  97. public StreamReader OpenText()
  98. {
  99. return null;
  100. }
  101. public FileStream OpenWrite()
  102. {
  103. return Open(FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
  104. }
  105. */
  106. public FileInfo CopyTo(string destFile)
  107. {
  108. return CopyTo(destFile, false);
  109. }
  110. public FileInfo CopyTo(string destFile, bool bOverwrite)
  111. {
  112. return null;
  113. }
  114. public override void Delete()
  115. {
  116. }
  117. public void MoveTo(string destName)
  118. {
  119. }
  120. }
  121. }