Exemplo n.º 1
0
 public static void CopyFolder(NPath fromPath, NPath toPath)
 {
     Logger.Trace("CopyFolder fromPath: {0} toPath:{1}", fromPath.ToString(), toPath.ToString());
     toPath.DeleteIfExists();
     toPath.EnsureParentDirectoryExists();
     fromPath.Move(toPath);
 }
Exemplo n.º 2
0
        private NPath MoveOctorun(NPath fromPath)
        {
            var toPath = installDetails.InstallationPath;

            toPath.DeleteIfExists();
            toPath.EnsureParentDirectoryExists();
            fromPath.Move(toPath);
            fromPath.Parent.Delete();
            return(installDetails.ExecutablePath);
        }
Exemplo n.º 3
0
        private NPath MoveOctorun(NPath fromPath)
        {
            var toPath = installDetails.InstallationPath;

            Logger.Trace($"Moving tempDirectory:'{fromPath}' to extractTarget:'{toPath}'");

            toPath.DeleteIfExists();
            toPath.EnsureParentDirectoryExists();
            fromPath.Move(toPath);
            return(installDetails.ExecutablePath);
        }
Exemplo n.º 4
0
        private NPath MoveGitAndLfs(NPath gitExtractPath, NPath gitLfsExtractPath, NPath tempZipExtractPath)
        {
            var targetGitLfsExecPath = installDetails.GetGitLfsExecutablePath(gitExtractPath);
            var extractGitLfsExePath = gitLfsExtractPath.Combine(installDetails.GitLfsExecutable);

            Logger.Trace($"Moving Git LFS Exe:'{extractGitLfsExePath}' to target in tempDirectory:'{targetGitLfsExecPath}'");

            extractGitLfsExePath.Move(targetGitLfsExecPath);

            Logger.Trace($"Moving tempDirectory:'{gitExtractPath}' to extractTarget:'{installDetails.GitInstallationPath}'");

            installDetails.GitInstallationPath.EnsureParentDirectoryExists();
            gitExtractPath.Move(installDetails.GitInstallationPath);

            Logger.Trace($"Deleting targetGitLfsExecPath:'{targetGitLfsExecPath}'");

            targetGitLfsExecPath.DeleteIfExists();

            Logger.Trace($"Deleting tempZipPath:'{tempZipExtractPath}'");
            tempZipExtractPath.DeleteIfExists();
            return(installDetails.GitExecutablePath);
        }