Ejemplo n.º 1
0
        public void CopyFromSourceToDest(string relativePath, string fileName)
        {
            var sourceFile    = GetFileFromSource(Path.Combine(relativePath, fileName));
            var destDirectory = RoutesExtensions.GetOrCreateDirectory(Path.Combine(_destinationDir.FullName, relativePath));
            var destFile      = Path.Combine(destDirectory.FullName, fileName);

            sourceFile.CopyTo(destFile, true);
        }
Ejemplo n.º 2
0
 public FileInfo GetFileFromDestination(string path)
 {
     return(RoutesExtensions.GetFile(Path.Combine(_destinationDir.FullName, path)));
 }
Ejemplo n.º 3
0
 public DirectoryInfo GetOrCreateDestDirectory(string path)
 {
     return(RoutesExtensions.GetOrCreateDirectory(Path.Combine(_destinationDir.FullName, path)));
 }
Ejemplo n.º 4
0
 public FileInfo GetFileFromSource(string path)
 {
     return(RoutesExtensions.GetFile(Path.Combine(_sourceDir.FullName, path)));
 }
Ejemplo n.º 5
0
 public DirectoryInfo GetDirectoryFromSource(string path)
 {
     return(RoutesExtensions.GetDirectory(Path.Combine(_sourceDir.FullName, path)));
 }
Ejemplo n.º 6
0
 public RoutesManager(string sourceDirPath, string destinationDirPath)
 {
     _sourceDir      = RoutesExtensions.GetDirectory(sourceDirPath);
     _destinationDir = RoutesExtensions.GetOrCreateDirectory(destinationDirPath);
 }