Environment.SpecialFolderOption.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. namespace System
  5. {
  6. public static partial class Environment
  7. {
  8. public enum SpecialFolderOption
  9. {
  10. None = 0,
  11. Create = SpecialFolderOptionValues.CSIDL_FLAG_CREATE,
  12. DoNotVerify = SpecialFolderOptionValues.CSIDL_FLAG_DONT_VERIFY,
  13. }
  14. // These values are specific to Windows and are known to SHGetFolderPath, however they are
  15. // also the values used in the SpecialFolderOption enum. As such, we keep them as constants
  16. // with their Win32 names, but keep them here rather than in Interop.Kernel32 as they're
  17. // used on all platforms.
  18. private static class SpecialFolderOptionValues
  19. {
  20. /// <summary>
  21. /// Force folder creation in SHGetFolderPath. Equivalent of KF_FLAG_CREATE (0x00008000).
  22. /// </summary>
  23. internal const int CSIDL_FLAG_CREATE = 0x8000;
  24. /// <summary>
  25. /// Return an unverified folder path. Equivalent of KF_FLAG_DONT_VERIFY (0x00004000).
  26. /// </summary>
  27. internal const int CSIDL_FLAG_DONT_VERIFY = 0x4000;
  28. }
  29. }
  30. }