Example #1
0
        /// <summary>
        ///     Creates the directory path by combining the environement directory variable and the relative path.
        /// </summary>
        /// <param name="directory">Environement directory.</param>
        /// <param name="path">Relative path.</param>
        public static string CreateEnvironmentDirectoryPath(TabsterEnvironmentDirectory directory, string path)
        {
            var combined = Path.Combine(GetEnvironmentDirectoryPath(directory), path);

            if (!Directory.Exists(combined))
            {
                Directory.CreateDirectory(combined);
            }

            return(combined);
        }
Example #2
0
        /// <summary>
        ///     Returns the absolute path of the supplied environment directory.
        /// </summary>
        /// <param name="directory"></param>
        /// <returns></returns>
        public static string GetEnvironmentDirectoryPath(TabsterEnvironmentDirectory directory)
        {
            switch (directory)
            {
            case TabsterEnvironmentDirectory.ApplicatonData:
                return(ApplicationDataDirectory);

            case TabsterEnvironmentDirectory.UserData:
                return(UserDataDirectory);
            }

            return(null);
        }
Example #3
0
        /// <summary>
        ///     Creates the directory path by combining the environement directory variable and the relative path.
        /// </summary>
        /// <param name="directory">Environement directory.</param>
        /// <param name="path">Relative path.</param>
        public static string CreateEnvironmentDirectoryPath(TabsterEnvironmentDirectory directory, string path)
        {
            var combined = Path.Combine(GetEnvironmentDirectoryPath(directory), path);

            if (!Directory.Exists(combined))
                Directory.CreateDirectory(combined);

            return combined;
        }
Example #4
0
        /// <summary>
        ///     Returns the absolute path of the supplied environment directory.
        /// </summary>
        /// <param name="directory"></param>
        /// <returns></returns>
        public static string GetEnvironmentDirectoryPath(TabsterEnvironmentDirectory directory)
        {
            switch (directory)
            {
                case TabsterEnvironmentDirectory.ApplicatonData:
                    return ApplicationDataDirectory;
                case TabsterEnvironmentDirectory.UserData:
                    return UserDataDirectory;
            }

            return null;
        }