Apex
CloudFiles Client
Get Folder Contents
this method is used to get contents of the folders stored in external storage like sharepoint, google drive etc please note, this functions works with multiple source folders and returns a list with each item representing the contents of each source folder global static list\<resourcelist> getfoldercontents( list\<resource> folders, string sortby, string sortorder, string runas, string contenttype ) parameters folders list of resource docid\ mr7u7qdhigoasucpf nlr class representing source folders sortby content field for sorting example name for alphabetic sorting sortorder ascending or descending runas email id of the user on whom behalf the function should run if you want to run the action as automation user, supply integrationuser contenttype use null to return everything use folder to only return folders return type list of resource list docid\ ufmey5fawzh3pa7u79q4s objects example list\<cldfs resource> folders = new list\<cldfs resource>{ new cldfs resource( '673ee359f5ba94c5a0980899', 'folder', 'test folder creation', 'cloudfiles', 'workspace' ) }; list\<cldfs resourcelist> outputs = cldfs client getfoldercontents( folders, null, null, 'integrationuser', null );