예제 #1
0
        /// <summary>
        /// Path for incoming data files
        /// </summary>
        /// <returns></returns>
        static string GetIncommingFileName(string prefix, string cbtt, string pcode, string fileExtension)
        {
            string incoming = ConfigurationManager.AppSettings["incoming"];

            if (incoming == "" || incoming == null)
            {
                Console.WriteLine("Error: 'incoming' directory not defined in config file");
                Logger.WriteLine("Error: 'incoming' directory not defined in config file");

                // hack hack hack
                // hack hack hack
                if (LinuxUtility.IsLinux())
                {
                    incoming = "/tmp";
                }
                else
                {
                    incoming = "C:\\Temp\\";
                }
            }

            return(Path.Combine(incoming, TimeSeriesTransfer.GetUniqueFileName(incoming, prefix, cbtt, pcode, fileExtension)));
        }