alfresco api alternatives for python os.walk

cancel
Showing results for 
Search instead for 
Did you mean: 
Bro
Member II

alfresco api alternatives for python os.walk

I'd like to find all files from specific directory using python.

I've checked Alfresco Core API, first I found my desired folder with /queries/nodes, then I tried to check it's contents with /nodes/{nodeId}/children. But it returns all stored folders in that directory.

Any alternatives to :

for root, dirs, files in os.walk("/"):
        for d in dirs:
                if specific_folder in d:
                    for f in files:
Thanks
4 Replies
angelborroy
Alfresco Employee

Re: alfresco api alternatives for python os.walk

Not sure to understand your requirement, but you may try using CMIS protocol:

https://chemistry.apache.org/python/cmislib.html

Hyland Developer Evangelist
Bro
Member II

Re: alfresco api alternatives for python os.walk

cmislib is unauthorized. I can only use Alfresco core api or search api.

Bro
Member II

Re: alfresco api alternatives for python os.walk

I want just to download all files from specific folders. 

fedorow
Senior Member II

Re: alfresco api alternatives for python os.walk

For search API use query with path and type, for example:

(PATH:'/app:company_home/st:sites/cm:yoursite/cm:documentLibrary//*') AND (+TYPE:'cm:content') AND (<your query for documents>)