summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs
diff options
context:
space:
mode:
author[email protected] <sr55>2016-01-29 21:21:07 +0000
committer[email protected] <sr55>2016-01-29 21:21:07 +0000
commit8343b1cacf87f673a7e0b82c6cd1449d9c529edc (patch)
treed953661f4cecf1d7bf2e5f8f00a1767ce40d72e7 /win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs
parentdb29f87dc3bf3909d263491390d0f56418616e26 (diff)
WinGui: Allow the Nightly build and Release version to be run side-by-side. The nightly build will store the config and presets file in a "Nightly" sub directory. If this directory doesn't exist, it'll create it and try port the release versions to it.
Diffstat (limited to 'win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs')
-rw-r--r--win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs b/win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs
new file mode 100644
index 000000000..242a2188f
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs
@@ -0,0 +1,41 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="DirectoryUtilities.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Defines the DirectoryUtilities type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Utilities
+{
+ using System;
+ using System.IO;
+
+ /// <summary>
+ /// The directory utilities.
+ /// </summary>
+ public class DirectoryUtilities
+ {
+ /// <summary>
+ /// The get user storage path.
+ /// </summary>
+ /// <param name="isNightly">
+ /// The is nightly.
+ /// </param>
+ /// <returns>
+ /// The <see cref="string"/>.
+ /// </returns>
+ public static string GetUserStoragePath(bool isNightly)
+ {
+ if (isNightly)
+ {
+ return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "HandBrake", "Nightly");
+ }
+ else
+ {
+ return Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "HandBrake");
+ }
+ }
+ }
+}