Beispiel #1
0
        List <string> GetIncludeExcludeFiles(List <string> filePaths, ZoneCSVFileType type)
        {
            List <string> files = new List <string>();

            foreach (string filePath in filePaths)
            {
                if (!File.Exists(filePath))
                {
                    throw new ApplicationException("Could not find '" + filePath + "', check args.");
                }

                string searchDir = Path.GetDirectoryName(filePath);
                string fileName  = Path.GetFileNameWithoutExtension(filePath);

                ZoneCSVFile csvFile = new ZoneCSVFile(searchDir, fileName);
                csvFile.Read();
                files.AddRange(csvFile.GetFileList(type));
            }
            return(files);
        }
Beispiel #2
0
        public new void Read()
        {
            base.Read();

            List <string> includes = GetFileList(ZoneCSVFileType.Include);

            includes.AddRange(GetFileList(ZoneCSVFileType.IncludePC));
            foreach (string inc in includes)
            {
                ZoneCSVFile include = new ZoneCSVFile(_searchDir, inc);
                include.Read();
                _includes.Add(include);
            }

            List <string> ignores = GetFileList(ZoneCSVFileType.Ignore);

            foreach (string ign in ignores)
            {
                ZoneCSVFile ignore = new ZoneCSVFile(_searchDir, ign);
                ignore.Read();
                _ignores.Add(ignore);
            }
        }