コード例 #1
0
        /// <summary>
        /// Returns the full path to the DIRECTORY that will contain the file output
        /// <see cref="TraceListener"/> rolling files. The complete path is the root
        /// folder defined by this <see cref="Environment.SpecialFolder"/> --- OR, if that was
        /// specified as null, then the root folder is <see cref="Path.GetTempPath"/>
        /// --- combined with the <see cref="IAppScope.GetAppDataFolderPath"/>; and,
        /// any further optional subfolder defined within.
        /// </summary>
        /// <returns>Not null: absolute, and does not include the file name.</returns>
        public string GetLogFolderPath()
        {
            string path
                = Path.Combine(
                      LogFileRootLocation.HasValue
                                                                        ? Environment.GetFolderPath(LogFileRootLocation.Value)
                                                                        : Path.GetTempPath(),
                      AppScope.GetAppDataFolderPath());

            return(string.IsNullOrEmpty(LogFileInnerSubFolder)
                                        ? path
                                        : Path.Combine(path, LogFileInnerSubFolder));
        }