1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-13 23:20:05 +00:00

feat: listFolder and improvements

This commit is contained in:
Mihajlo Medjedovic
2020-12-22 19:24:33 +01:00
parent 7bf53858f0
commit f1b035032f
12 changed files with 4419 additions and 5 deletions

View File

@@ -277,6 +277,17 @@ export default class SASjs {
return await this.sasViyaApiClient?.deleteFolder(folderPath, accessToken)
}
/**
* Lists a children folders for given Viya folder.
* @param sourceFolder - the full path (eg `/Public/example/myFolder`) or URI of the source folder listed. Providing URI instead of path will save one extra request.
* @param accessToken - an access token for authorizing the request.
*/
public async listFolder(sourceFolder: string, accessToken?: string) {
this.isMethodSupported('listFolder', ServerType.SASViya)
return await this.sasViyaApiClient?.listFolder(sourceFolder, accessToken)
}
/**
* Moves folder to a new location. The folder may be renamed at the same time.
* @param sourceFolder - the full path (eg `/Public/example/myFolder`) or URI of the source folder to be moved. Providing URI instead of path will save one extra request.