Example #1
0
        public List <TmpSave> FileToTmptable(string hostname, string filepath, DateTime savedate)
        {
            List <TmpSave> tmpTable = new List <TmpSave>();

            IOhelper.getallfilename(filepath).ForEach((S) =>
            {
                tmpTable.Add(new TmpSave()
                {
                    SaveDate = savedate,
                    Filename = S,
                    Filepath = filepath,
                    Hostname = hostname,
                    Note     = ""
                });
            });
            return(tmpTable);
        }
Example #2
0
        internal void FindAwayfile(TmpSave x)
        {
            string changhost = x.Filepath.Replace(Settings.Mainhost.hostname, Settings.Awayhost.hostname).Replace(":", "$");

            string awaypath = changhost.Replace(Settings.Mainhost.path, Settings.Awayhost.path);

            if (!IOhelper.FileExists(awaypath + @"\" + x.Filename))
            {
                compair_DIFFs.Add(new Compair_DIFF
                {
                    Datetime = x.SaveDate,
                    Filename = x.Filename,
                    FilePath = x.Filepath,
                    Hostname = x.Hostname,
                    Note     = "次要主機無此檔案"
                });
            }
        }