public void DownloadFolderContent(IServerPath serverPath, ILocalPath localPath, ILogger logger) { var items = this.VersionControlServer.GetItems(serverPath.AsString(), VersionSpec.Latest, RecursionType.OneLevel); foreach (var item in items.Items) { if (0 == string.Compare(item.ServerItem, serverPath.AsString(), true)) { continue; } var itemServerPath = new ServerPath(item.ServerItem); var itemLocalPath = localPath.Subpath(itemServerPath.GetName()); if (item.ItemType == ItemType.File) { logger.Info($"Download file {item.ServerItem} to {itemLocalPath.AsString()}"); item.DownloadFile(itemLocalPath.AsString()); } else { DownloadFolderContent(itemServerPath, itemLocalPath, logger); } } }
public void Execute(IInstallerBuildContext context) { var path = _toFolder.Subpath(Constants.LatestTxt); context.Logger.Info($"Writting content for {path.AsString()}"); context.FileSystemAdapter.WriteTextFileContent(path, _content); }
public void Execute(IInstallerBuildContext context) { context.Logger.Info($"Start download component from {_component.DistributionFolder.AsString()}"); context.SourceControlAdapter.DownloadFolderContent(_component.DistributionFolder, _toFolder.Subpath(_component.ComponentID), context.Logger); }
public ILocalPath ResolveDistributionLocalPath(ILocalPath basePath) { return(basePath.Subpath(Folders.EnginesAndGamesFolder.WellKnownName) .Subpath(_contentProvider.Name) .Subpath(Folders.EngineFolder.WellKnownName) .Subpath(_version.ToString())); }
public ILocalPath ResolveDistributionLocalPath(ILocalPath basePath) { return(basePath.Subpath(Folders.EnginesAndGamesFolder.WellKnownName) .Subpath(_engineName.ToString()) .Subpath(Folders.GamesFolder.WellKnownName) .Subpath(_gameName) .Subpath(Folders.GameLimitsFolder.WellKnownName) .Subpath(_version.ToString())); }
public ILocalPath ResolveDistributionPath(ILocalPath basePath) { return(basePath.Subpath(this.FileName)); }
public ILocalPath ResolveBuildOutputPath(ILocalPath basePath) { return(basePath.Subpath(Folders.GamesFolder.WellKnownName) .Subpath(GameName) .Subpath(FileName)); }
public ILocalPath ResolveDistributionPath(ILocalPath basePath) { return(basePath.Subpath(this.FileDefinition.DistributionRelativePath)); }
public virtual ILocalPath ResolveBuildOutputPath(ILocalPath basePath) { return(basePath.Subpath(FileDefinition.BuildOutputRelativePath)); }
public IServerPath Subpath(string name) { return(new MockServerPath(_localPath.Subpath(name).AsString())); }