Ejemplo n.º 1
0
 /// <summary>
 /// Gets the item info.
 /// </summary>
 /// <returns>The item (folder or file) info.</returns>
 /// <param name="repoKey">Repo key.</param>
 /// <param name="path">Path.</param>
 public Artifactory.Response.FileInfo GetItemInfo(string repoKey, string path)
 {
     if (Context.GetConfigBooleanValue("artifactory_repo_restriction_deploy"))
     {
         CheckRepoRestriction(repoKey);
     }
     return(ArtifactoryBaseUrl.Storage().FileInfo(repoKey, path));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the storage info.
        /// </summary>
        /// <param name="repo">Repo.</param>
        public RepositoriesSummary GetStorageInfo(string repo)
        {
            if (string.IsNullOrEmpty(repo))
            {
                throw new Exception("Invalid storage name : " + repo);
            }
            var info = ArtifactoryBaseUrl.Storage().StorageInfo();

            foreach (var storage in info.repositoriesSummaryList)
            {
                if (repo.Equals(storage.repoKey))
                {
                    return(storage);
                }
            }
            return(null);
        }
Ejemplo n.º 3
0
 public MessageContainer MoveItem(string srcRepoKey, string srcFilePath, string targetRepoKey, string targetFilePath, int dry)
 {
     return(ArtifactoryBaseUrl.Storage().MoveItem(srcRepoKey, srcFilePath, targetRepoKey, targetFilePath, dry));
 }
Ejemplo n.º 4
0
 public FolderInfo CreateFolder(string repoKey, string path)
 {
     return(ArtifactoryBaseUrl.Storage().CreateFolder(repoKey, path));
 }
Ejemplo n.º 5
0
 public void DeleteFile(string repoKey, string path)
 {
     ArtifactoryBaseUrl.Storage().DeleteItem(repoKey, path);
 }