Exemple #1
0
        /// ------------------------------------------------------------------------------------
        public IDictionary <string, IEnumerable <string> > GetParticipantFilesToArchive(Type typeOfArchive)
        {
            Dictionary <string, IEnumerable <string> > d = new Dictionary <string, IEnumerable <string> >();

            foreach (var person in GetAllParticipants().Select(n => _personInformant.GetPersonByNameOrCode(n)).Where(p => p != null))
            {
                var filesInDir = Directory.GetFiles(person.FolderPath);
                d[person.Id] = filesInDir.Where(f => ArchivingHelper.IncludeFileInArchive(f, typeOfArchive, Settings.Default.PersonFileExtension));
            }
            return(d);
        }
Exemple #2
0
        /// ------------------------------------------------------------------------------------
        public IEnumerable <string> GetSessionFilesToArchive(Type typeOfArchive)
        {
            using (ZipFile zip = new ZipFile())
            {
                // RAMP packages must not be compressed or RAMP can't read them.
                zip.CompressionLevel = Ionic.Zlib.CompressionLevel.None;
                zip.AddDirectory(FolderPath);
                zip.Save(Path.Combine(FolderPath, "Sessions.zip"));
            }
            var filesInDir = Directory.GetFiles(FolderPath);

            return(filesInDir.Where(f => ArchivingHelper.IncludeFileInArchive(f, typeOfArchive, Settings.Default.SessionFileExtension)));
        }
Exemple #3
0
        /// ------------------------------------------------------------------------------------
        public IEnumerable <string> GetSessionFilesToArchive(Type typeOfArchive)
        {
            var filesInDir = Directory.GetFiles(FolderPath);

            return(filesInDir.Where(f => ArchivingHelper.IncludeFileInArchive(f, typeOfArchive, Settings.Default.SessionFileExtension)));
        }