Signature

global static void createFoldersAsync(
  List<Types.CreateFolderInput> inputs,
  String libraryId,
  String runAs
)
Parameters
ParameterDescription
inputs requiredOne entry per folder. Provide a request id (random string) with each input to later filter the CloudFiles Event Object for the newly created folder.
libraryId
String
requiredType of library, e.g. sharepoint. Get this value from the Content Library.
runAs
String
optionalEmail of the user on whose behalf the action runs. Supply integrationUser to run as the automation user.

Return Type

void — this method runs asynchronously and does not return information about the newly created folders. Filter the CloudFiles Event Object using the request id supplied on each input to retrieve details of the created folder.

Example

List<cldfs.Types.CreateFolderInput> inputs = new List<cldfs.Types.CreateFolderInput>{
    new cldfs.Types.CreateFolderInput('01PLJOYLOAWJBFGBSE7FHK5AKOSIMDIO6H', 'TestFolder', 'b!ZfA15HRS1Uy9pH3Vw5tFjAHfP1lRYlZAvDwLnHYYq8sa-L6ejXB-TJbMYUxi1QfL', 'super-random-string')
};
cldfs.Client.createFoldersAsync(
   inputs,
  'sharepoint',
  'integrationUser'
);
When to usePrefer createFoldersAsync over createFolders when migrating large amounts of data — it handles both cloud-storage and Salesforce rate limits.