Environment.SpecialFolderOption.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  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. #if PROJECTN
  9. [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
  10. #endif
  11. public enum SpecialFolderOption
  12. {
  13. None = 0,
  14. Create = SpecialFolderOptionValues.CSIDL_FLAG_CREATE,
  15. DoNotVerify = SpecialFolderOptionValues.CSIDL_FLAG_DONT_VERIFY,
  16. }
  17. // These values are specific to Windows and are known to SHGetFolderPath, however they are
  18. // also the values used in the SpecialFolderOption enum. As such, we keep them as constants
  19. // with their Win32 names, but keep them here rather than in Interop.Kernel32 as they're
  20. // used on all platforms.
  21. private static class SpecialFolderOptionValues
  22. {
  23. /// <summary>
  24. /// Force folder creation in SHGetFolderPath. Equivalent of KF_FLAG_CREATE (0x00008000).
  25. /// </summary>
  26. internal const int CSIDL_FLAG_CREATE = 0x8000;
  27. /// <summary>
  28. /// Return an unverified folder path. Equivalent of KF_FLAG_DONT_VERIFY (0x00004000).
  29. /// </summary>
  30. internal const int CSIDL_FLAG_DONT_VERIFY = 0x4000;
  31. }
  32. }
  33. }