25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

58 lines
2.9 KiB

  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. using System.IO;
  22. using System.Runtime.InteropServices;
  23. namespace Alphaleonis.Win32.Filesystem
  24. {
  25. internal static partial class NativeMethods
  26. {
  27. /// <summary>Contains the basic information for a file. Used for file handles.</summary>
  28. /// <remarks>
  29. /// <para>Specifying -1 for <see cref="LastAccessTime"/>, <see cref="ChangeTime"/>, or <see cref="LastWriteTime"/></para>
  30. /// <para>indicates that operations on the current handle should not affect the given field.</para>
  31. /// <para>(I.e, specifying -1 for <see cref="LastWriteTime"/> will leave the <see cref="LastWriteTime"/> unaffected by writes performed
  32. /// on the current handle.)</para>
  33. /// </remarks>
  34. [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
  35. internal struct FILE_BASIC_INFO
  36. {
  37. /// <summary>The time the file was created in <see cref="FILETIME"/> format,
  38. /// <para>which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</para>
  39. /// </summary>
  40. public FILETIME CreationTime;
  41. /// <summary>The time the file was last accessed in <see cref="FILETIME"/> format.</summary>
  42. public FILETIME LastAccessTime;
  43. /// <summary>The time the file was last written to in <see cref="FILETIME"/> format.</summary>
  44. public FILETIME LastWriteTime;
  45. /// <summary>The time the file was changed in <see cref="FILETIME"/> format.</summary>
  46. public FILETIME ChangeTime;
  47. /// <summary>The file attributes.</summary>
  48. /// <remarks>If this is set to 0 in a <see cref="FILE_BASIC_INFO"/> structure passed to SetFileInformationByHandle then none of the attributes are changed.</remarks>
  49. public FileAttributes FileAttributes;
  50. }
  51. }
  52. }