/[AnywhereTS-MSSQL]/trunk/Tools/ATSClientManager/ATSClientManager/ATSClientFilesCollection.cs
ViewVC logotype

Diff of /trunk/Tools/ATSClientManager/ATSClientManager/ATSClientFilesCollection.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 335 by william, Mon Aug 27 22:06:40 2012 UTC revision 341 by william, Mon Aug 27 22:56:48 2012 UTC
# Line 2  Line 2 
2  using System.Collections.Generic;  using System.Collections.Generic;
3  using System.Linq;  using System.Linq;
4  using System.Text;  using System.Text;
5    using System.IO;
6  namespace AnywhereTS.ATSClientManager  namespace AnywhereTS.ATSClientManager
7  {    {  
8      public static class ATSClientFilesCollection      public static class ATSClientFilesCollection
# Line 41  namespace AnywhereTS.ATSClientManager Line 42  namespace AnywhereTS.ATSClientManager
42              if (found == ATSClientFileTypes.ClientUnknown) { Logging.ATSClientManagerLog.FatalFormat("ATSClientFilesCollection does not contain a client type for file: {0}", name); }              if (found == ATSClientFileTypes.ClientUnknown) { Logging.ATSClientManagerLog.FatalFormat("ATSClientFilesCollection does not contain a client type for file: {0}", name); }
43              return found;              return found;
44          }          }
45    
46            public static ATSClientFileList GetClientFilesInPath(DirectoryInfo path)
47            {
48                ATSClientFileList list = new ATSClientFileList();
49                List<IATSClientFile> client_files = new List<IATSClientFile>();
50                List<FileInfo> files = new List<FileInfo>(path.GetFiles());            
51                foreach (var file in files)
52                {
53                    ATSClientFileTypes type = GetClientFileTypeByName(file.Name);
54                    client_files.Add(ATSClientFile.Create(type, file.FullName));
55                }
56                list = new ATSClientFileList(client_files);
57                return list;
58            }
59            public static ATSClientFileList GetClientFilesInPath(string path)
60            {
61                return GetClientFilesInPath(new DirectoryInfo(path));
62            }
63    
64      }      }
65  }  }

Legend:
Removed from v.335  
changed lines
  Added in v.341

  ViewVC Help
Powered by ViewVC 1.1.22