Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

FileInfoByHandleClass.cs 11 KiB

vor 8 Jahren
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. /* Copyright (C) 2008-2016 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a copy
  4. * of this software and associated documentation files (the "Software"), to deal
  5. * in the Software without restriction, including without limitation the rights
  6. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. * copies of the Software, and to permit persons to whom the Software is
  8. * furnished to do so, subject to the following conditions:
  9. *
  10. * The above copyright notice and this permission notice shall be included in
  11. * all copies or substantial portions of the Software.
  12. *
  13. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. * THE SOFTWARE.
  20. */
  21. namespace Alphaleonis.Win32.Filesystem
  22. {
  23. internal static partial class NativeMethods
  24. {
  25. /// <summary>FILE_INFO_BY_HANDLE_CLASS
  26. /// <para>Identifies the type of file information that GetFileInformationByHandleEx should retrieve or SetFileInformationByHandle should set.</para>
  27. /// </summary>
  28. internal enum FileInfoByHandleClass
  29. {
  30. #region FILE_BASIC_INFO
  31. /// <summary>FILE_BASIC_INFO
  32. /// <para>Minimal information for the file should be retrieved or set. Used for file handles.</para>
  33. /// </summary>
  34. FileBasicInfo = 0,
  35. #endregion // FILE_BASIC_INFO
  36. #region FILE_STANDARD_INFO
  37. ///// <summary>FILE_STANDARD_INFO
  38. ///// <para>Extended information for the file should be retrieved. Used for file handles.</para>
  39. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  40. ///// </summary>
  41. //FileStandardInfo = 1,
  42. #endregion // FILE_STANDARD_INFO
  43. #region FILE_NAME_INFO
  44. ///// <summary>FILE_NAME_INFO
  45. ///// <para>The file name should be retrieved. Used for any handles.</para>
  46. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  47. ///// </summary>
  48. //FileNameInfo = 2,
  49. #endregion // FILE_NAME_INFO
  50. #region FILE_RENAME_INFO
  51. ///// <summary>FILE_RENAME_INFO
  52. ///// <para>The file name should be changed. Used for file handles.</para>
  53. ///// <para>Use only when calling <see cref="SetFileInformationByHandle"/>.</para>
  54. ///// </summary>
  55. //FileRenameInfo = 3,
  56. #endregion // FILE_RENAME_INFO
  57. #region FILE_DISPOSITION_INFO
  58. ///// <summary>FILE_DISPOSITION_INFO
  59. ///// <para>The file should be deleted. Used for any handles.</para>
  60. ///// <para>Use only when calling <see cref="SetFileInformationByHandle"/>.</para>
  61. ///// </summary>
  62. //FileDispositionInfo = 4,
  63. #endregion // FILE_DISPOSITION_INFO
  64. #region FILE_ALLOCATION_INFO
  65. ///// <summary>FILE_ALLOCATION_INFO
  66. ///// <para>The file allocation information should be changed. Used for file handles.</para>
  67. ///// <para>Use only when calling <see cref="SetFileInformationByHandle"/>.</para>
  68. ///// </summary>
  69. //FileAllocationInfo = 5,
  70. #endregion // FILE_ALLOCATION_INFO
  71. #region FILE_END_OF_FILE_INFO
  72. ///// <summary>FILE_END_OF_FILE_INFO
  73. ///// <para>The end of the file should be set. Use only when calling <see cref="SetFileInformationByHandle"/>.</para>
  74. ///// </summary>
  75. //FileEndOfFileInfo = 6,
  76. #endregion // FILE_END_OF_FILE_INFO
  77. #region FILE_STREAM_INFO
  78. ///// <summary>FILE_STREAM_INFO
  79. ///// <para>File stream information for the specified file should be retrieved. Used for any handles.</para>
  80. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  81. ///// </summary>
  82. //FileStreamInfo = 7,
  83. #endregion // FILE_STREAM_INFO
  84. #region FILE_COMPRESSION_INFO
  85. ///// <summary>FILE_COMPRESSION_INFO
  86. ///// <para>File compression information should be retrieved. Used for any handles.</para>
  87. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  88. ///// </summary>
  89. //FileCompressionInfo = 8,
  90. #endregion // FILE_COMPRESSION_INFO
  91. #region FILE_ATTRIBUTE_TAG_INFO
  92. ///// <summary>FILE_ATTRIBUTE_TAG_INFO
  93. ///// <para>File attribute information should be retrieved. Used for any handles.</para>
  94. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  95. ///// </summary>
  96. //FileAttributeTagInfo = 9,
  97. #endregion // FILE_ATTRIBUTE_TAG_INFO
  98. #region FILE_ID_BOTH_DIR_INFO
  99. /// <summary>FILE_ID_BOTH_DIR_INFO
  100. /// <para>Files in the specified directory should be retrieved. Used for directory handles.</para>
  101. /// <para>Use only when calling GetFileInformationByHandleEx.</para>
  102. /// <remarks>
  103. /// <para>The number of files returned for each call to GetFileInformationByHandleEx</para>
  104. /// <para>depends on the size of the buffer that is passed to the function.</para>
  105. /// <para>Any subsequent calls to GetFileInformationByHandleEx on the same handle</para>
  106. /// <para>will resume the enumeration operation after the last file is returned.</para>
  107. /// </remarks>
  108. /// </summary>
  109. FileIdBothDirectoryInfo = 10,
  110. #endregion // FILE_ID_BOTH_DIR_INFO
  111. #region FILE_ID_BOTH_DIR_INFO
  112. ///// <summary>FILE_ID_BOTH_DIR_INFO
  113. ///// <para>Identical to <see cref="FileIdBothDirectoryInfo"/>, but forces the enumeration operation to start again from the beginning.</para>
  114. ///// </summary>
  115. //FileIdBothDirectoryInfoRestartInfo = 11,
  116. #endregion // FILE_ID_BOTH_DIR_INFO
  117. #region FILE_IO_PRIORITY_HINT_INFO
  118. ///// <summary>FILE_IO_PRIORITY_HINT_INFO
  119. ///// <para>Priority hint information should be set.Use only when calling <see cref="SetFileInformationByHandle"/>.</para>
  120. ///// </summary>
  121. //FileIoPriorityHintInfo = 12,
  122. #endregion // FILE_IO_PRIORITY_HINT_INFO
  123. #region FILE_REMOTE_PROTOCOL_INFO
  124. ///// <summary>(13) FILE_REMOTE_PROTOCOL_INFO
  125. ///// <para>File remote protocol information should be retrieved.Use for any handles.</para>
  126. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  127. ///// </summary>
  128. //FileRemoteProtocolInfo = 13,
  129. #endregion // FILE_REMOTE_PROTOCOL_INFO
  130. #region FILE_FULL_DIR_INFO
  131. ///// <summary>(14) FILE_FULL_DIR_INFO
  132. ///// <para>Files in the specified directory should be retrieved. Used for directory handles.</para>
  133. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  134. ///// <remarks>
  135. ///// <para>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:</para>
  136. ///// <para>This value is not supported before Windows 8 and Windows Server 2012</para>
  137. ///// </remarks>
  138. ///// </summary>
  139. //FileFullDirectoryInfo = 14,
  140. #endregion // FILE_FULL_DIR_INFO
  141. #region FILE_FULL_DIR_INFO
  142. ///// <summary>FILE_FULL_DIR_INFO
  143. ///// <para>Identical to <see cref="FileFullDirectoryInfo"/>, but forces the enumeration operation to start again from the beginning. Use only when calling GetFileInformationByHandleEx.</para>
  144. ///// <remarks>
  145. ///// <para>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:</para>
  146. ///// <para>This value is not supported before Windows 8 and Windows Server 2012</para>
  147. ///// </remarks>
  148. ///// </summary>
  149. //FileFullDirectoryRestartInfo = 15,
  150. #endregion // FILE_FULL_DIR_INFO
  151. #region FILE_STORAGE_INFO
  152. ///// <summary>FILE_STORAGE_INFO
  153. ///// <para>File storage information should be retrieved. Use for any handles.</para>
  154. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  155. ///// <remarks>
  156. ///// <para>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:</para>
  157. ///// <para>This value is not supported before Windows 8 and Windows Server 2012</para>
  158. ///// </remarks>
  159. ///// </summary>
  160. //FileStorageInfo = 16,
  161. #endregion // FILE_STORAGE_INFO
  162. #region FILE_ALIGNMENT_INFO
  163. ///// <summary>FILE_ALIGNMENT_INFO
  164. ///// <para>File alignment information should be retrieved. Use for any handles.</para>
  165. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  166. ///// <remarks>
  167. ///// <para>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:</para>
  168. ///// <para>This value is not supported before Windows 8 and Windows Server 2012</para>
  169. ///// </remarks>
  170. ///// </summary>
  171. //FileAlignmentInfo = 17,
  172. #endregion FILE_ALIGNMENT_INFO
  173. #region FILE_ID_INFO
  174. ///// <summary>FILE_ID_INFO
  175. ///// <para>File information should be retrieved. Use for any handles.</para>
  176. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  177. ///// <remarks>
  178. ///// <para>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:</para>
  179. ///// <para>This value is not supported before Windows 8 and Windows Server 2012</para>
  180. ///// </remarks>
  181. ///// </summary>
  182. //FileIdInfo = 18,
  183. #endregion // FILE_ID_INFO
  184. #region FILE_ID_EXTD_DIR_INFO
  185. ///// <summary>FILE_ID_EXTD_DIR_INFO
  186. ///// <para>Files in the specified directory should be retrieved. Used for directory handles.</para>
  187. ///// <para>Use only when calling GetFileInformationByHandleEx.</para>
  188. ///// <remarks>
  189. ///// <para>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:</para>
  190. ///// <para>This value is not supported before Windows 8 and Windows Server 2012</para>
  191. ///// </remarks>
  192. ///// </summary>
  193. //FileIdExtdDirectoryInfo = 19,
  194. #endregion // FILE_ID_EXTD_DIR_INFO
  195. #region FILE_ID_EXTD_DIR_INFO
  196. ///// <summary>FILE_ID_EXTD_DIR_INFO
  197. ///// <para>Identical to <see cref="FileIdExtdDirectoryInfo"/>, but forces the enumeration operation to start again from the beginning. Use only when calling GetFileInformationByHandleEx.</para>
  198. ///// <remarks>
  199. ///// <para>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:</para>
  200. ///// <para>This value is not supported before Windows 8 and Windows Server 2012</para>
  201. ///// </remarks>
  202. ///// </summary>
  203. //FileIdExtdDirectoryRestartInfo = 20
  204. #endregion // FILE_ID_EXTD_DIR_INFO
  205. }
  206. }
  207. }