1. Create folder API [ D_pxNewFolder ]
Goal:
From an Activity, Create a folder in Repository & Create a subfolder in Repository.
We have to utilize the D_pxNewFolder Savable Data_Page in activity for creating the folder, subfolder.
To create a folder with this D_pxNewFolder API, pass in the following parameters to data page in the activity:
Steps:
1. Create an activity. In this example, I have placed the activity at @baseclass for the simplicity but it can be anywhere as it is required. In the first step, set required parameters for D_pxNewFolder.
2. In the second step, call Save-DataPage method in the activity and specify "D_pxNewFolder" Data Page. Check "Write Now" option and pass in the parameters.
3. Now, Let's test it. You can run it from Actions menu in the activity. Make sure Success Message window pops up.
4. In JFrog Artifactory Repository screen, click Refresh button of right click on our artifact. You will find a folder created at the root path of the artifact.
5. Now If you want to create a sub folder under some folder, you can specify it by "/" as below
(ex. "parentfolder/childfolder").
Note: If "parentfolder" does not exist, D_pxNewFolder API creates both folders. If "parentfolder" exists, API creates only "childfolder".
6. Now change the parameter Param.folderPath as below to create a sub folder.
7. Sub folder "childfolder" is created under "parentfolder" in JFrog Repository.
*********************************
0 Comments