summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib/shared/System/Environment.SpecialFolderOption.cs
blob: 929e3d9036a1dc16f9fc7bf2338cdb7e5a3580ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace System
{
    public static partial class Environment
    {
#if PROJECTN
        [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
#endif
        public enum SpecialFolderOption
        {
            None = 0,
            Create = SpecialFolderOptionValues.CSIDL_FLAG_CREATE,
            DoNotVerify = SpecialFolderOptionValues.CSIDL_FLAG_DONT_VERIFY,
        }

        // These values are specific to Windows and are known to SHGetFolderPath, however they are
        // also the values used in the SpecialFolderOption enum.  As such, we keep them as constants
        // with their Win32 names, but keep them here rather than in Interop.Kernel32 as they're
        // used on all platforms.
        private static class SpecialFolderOptionValues
        {
            /// <summary>
            /// Force folder creation in SHGetFolderPath. Equivalent of KF_FLAG_CREATE (0x00008000).
            /// </summary>
            internal const int CSIDL_FLAG_CREATE = 0x8000;

            /// <summary>
            /// Return an unverified folder path. Equivalent of KF_FLAG_DONT_VERIFY (0x00004000).
            /// </summary>
            internal const int CSIDL_FLAG_DONT_VERIFY = 0x4000;
        }
    }
}