Example #1
0
		public FileInfoCompare(FileInfo fiLeftAct, FileInfo fiLeftLast, FileInfo fiRightAct, FileInfo fiRightLast)
		{
			this.fiLeftAct = fiLeftAct;
			this.fiRightAct = fiRightAct;
			this.fiLeftLast = fiLeftLast;
			this.fiRightLast = fiRightLast;

			compareType = FileInfoCompareType.FullSync;
			compareItems = new List<FileInfoCompareItem>();
		}
Example #2
0
		public FileInfoCompare(FileInfo fiSource, FileInfo fiDestination)
		{
			this.fiLeftAct = fiSource;
			this.fiRightAct = fiDestination;
			this.fiLeftLast = null;
			this.fiRightLast = null;

			compareType = FileInfoCompareType.SingleMaster;
			compareItems = new List<FileInfoCompareItem>();
		}
Example #3
0
		void CompareDirectoryWithSub(FileInfo fiLeftAct, FileInfo fiLeftLast, FileInfo fiRightAct, FileInfo fiRightLast, FileInfoCompareItem parentDir)
		{
			int		lastRecFici = 0;

			CompareItems(fiLeftAct == null ? null : fiLeftAct.Files, fiLeftLast == null ? null : fiLeftLast.Files,
				fiRightAct == null ? null : fiRightAct.Files, fiRightLast == null ? null : fiRightLast.Files, parentDir);
			CompareItems(fiLeftAct == null ? null : fiLeftAct.Directories, fiLeftLast == null ? null : fiLeftLast.Directories,
				fiRightAct == null ? null : fiRightAct.Directories, fiRightLast == null ? null : fiRightLast.Directories, parentDir);

			while (compareItems.Count > lastRecFici)
			{
				if (compareItems[lastRecFici].IsDirectory)
				{
					CompareItems(compareItems[lastRecFici].fLeftAct == null ? null : compareItems[lastRecFici].fLeftAct.Files, 
						compareItems[lastRecFici].fLeftLast == null ? null : compareItems[lastRecFici].fLeftLast.Files,
						compareItems[lastRecFici].fRightAct == null ? null : compareItems[lastRecFici].fRightAct.Files, 
						compareItems[lastRecFici].fRightLast == null ? null : compareItems[lastRecFici].fRightLast.Files, parentDir);
					CompareItems(compareItems[lastRecFici].fLeftAct == null ? null : compareItems[lastRecFici].fLeftAct.Directories, 
						compareItems[lastRecFici].fLeftLast == null ? null : compareItems[lastRecFici].fLeftLast.Directories,
						compareItems[lastRecFici].fRightAct == null ? null : compareItems[lastRecFici].fRightAct.Directories, 
						compareItems[lastRecFici].fRightLast == null ? null : compareItems[lastRecFici].fRightLast.Directories, parentDir);
				}
				lastRecFici++;
			}
		}