using System;
using System.Collections.Generic;
using System.IO;

namespace BeWo.Office
{
    internal static class OfficeManager
    {
        public static String _CSVDelimiter = ";";

        private static List<String> _OpenFiles;

        internal static void DeleteTempFiles()
        {
            if (_OpenFiles != null)
            {
                foreach (var openFile in _OpenFiles)
                {
                    if (File.Exists(openFile))
                    {
                        File.Delete(openFile);
                    }
                }
            }
        }

        internal static void AddOpenFile(String filePath)
        {
            if (_OpenFiles == null)
                _OpenFiles = new List<String>();
            _OpenFiles.Add(filePath);
        }
    }
}
