internal void AddDestionationFile(BaseFile destinationFile) { if (!destinationFile.FileInfo.Exists) { //TODO: here must be notification message throw new FileNotFoundException("Destination file does not find"); } destinations.Add(destinationFile.Path, destinationFile); }
internal void AddDestionationFile(string destinationPath) { BaseFile dest = new BaseFile(destinationPath); if (!dest.FileInfo.Exists) { //TODO: here must be notification message throw new FileNotFoundException("Destination file does not find"); } destinations.Add(destinationPath, dest); }
private void RegisterPaths(BaseFile sourceFile, BaseFile destinationFile = null) { if (!sourceFile.FileInfo.Exists) { //TODO: here must be notification message throw new FileNotFoundException("Source file does not find"); } source = sourceFile; CreateWatcher(source.FileInfo.DirectoryName, source.FileInfo.Name); if (destinationFile != null) { if (!destinationFile.FileInfo.Exists) { //TODO: here must be notification message throw new FileNotFoundException("Source file does not find"); } destinations.Add(destinationFile.Path, destinationFile); } }
internal FileController(BaseFile sourceFile, BaseFile destinationFile) { RegisterPaths(sourceFile, destinationFile); }
private void RegisterSource(string sourcePath, string destinationPath = "") { source = new BaseFile(sourcePath); if (!source.FileInfo.Exists) { //TODO: here must be notification message throw new FileNotFoundException("Source file does not find"); } CreateWatcher(source.FileInfo.DirectoryName, source.FileInfo.Name); if (destinationPath != null && !destinationPath.Equals("")) { BaseFile dest = new BaseFile(destinationPath); if (!dest.FileInfo.Exists) { //TODO: here must be notification message throw new FileNotFoundException("Destination file does not find"); } destinations.Add(destinationPath, dest); } }