summaryrefslogtreecommitdiff
path: root/src/tools/heat/DirectoryHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/heat/DirectoryHelper.cs')
-rw-r--r--src/tools/heat/DirectoryHelper.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/tools/heat/DirectoryHelper.cs b/src/tools/heat/DirectoryHelper.cs
new file mode 100644
index 00000000..61a3d664
--- /dev/null
+++ b/src/tools/heat/DirectoryHelper.cs
@@ -0,0 +1,42 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Harvesters
4{
5 using WixToolset.Data.WindowsInstaller;
6 using Wix = WixToolset.Harvesters.Serialize;
7
8 internal static class DirectoryHelper
9 {
10 public static Wix.DirectoryBase CreateDirectory(string id)
11 {
12 if (WindowsInstallerStandard.IsStandardDirectory(id))
13 {
14 return new Wix.StandardDirectory()
15 {
16 Id = id
17 };
18 }
19
20 return new Wix.Directory()
21 {
22 Id = id
23 };
24 }
25
26 public static Wix.DirectoryBase CreateDirectoryReference(string id)
27 {
28 if (WindowsInstallerStandard.IsStandardDirectory(id))
29 {
30 return new Wix.StandardDirectory()
31 {
32 Id = id
33 };
34 }
35
36 return new Wix.DirectoryRef()
37 {
38 Id = id
39 };
40 }
41 }
42}