According to my research, if you want to manage Data Lake Gen2 directories, now we just can use Azure data lake gen2 rest api. For more details, please refer to the document.
For example, if you want to rename your folder, you can use the rest api
PuT https://<your account name>.dfs.core.windows.net/<file system name>/<new folder name>
Header:
x-ms-rename-source : /<file system name>/<orginal folder name>
Authorization : Bearer access token.
Regarding how to call the rest apiļ¼ please refer to the following steps
1. Create a service principal
az login
az ad sp create-for-rbac --name ServicePrincipalName
- assign role to the service principal
az role assignment create \
--role "Storage Blob Data Contributor" \
--assignee < your service principal name> \
--scope "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>"
- Call the rest api
az login --service-principal --username <your service principal app id> --password <your service principal password>--tenant <your tenant id>
az rest --method put --uri https://testadls05.dfs.core.windows.net/test/testFolder --resource https://storage.azure.com --headers x-ms-rename-source=/test/testFolder1