Signature

global static List<Resource> createFolders(
  List<Types.CreateFolderInput> inputs,
  String libraryId,
  String runAs
)
Parameters
ParameterDescription
inputs
List
requiredOne entry per folder. See Types.CreateFolderInput.
libraryId
String
requiredTarget storage library. Provider rules match the flow action — see Create Folder destination table.
runAs
String
optionalUsername to attribute the operation to; defaults to the integration user.

Returns

List<Resource> in input order. Failures throw CloudFilesException — partial success is not silent.

Example

List<Types.CreateFolderInput> inputs =
  new List<Types.CreateFolderInput>{
    new Types.CreateFolderInput('Contracts', parentId),
    new Types.CreateFolderInput('Invoices',  parentId)
  };
List<Resource> created =
  Client.createFolders(inputs, 'sharepoint_a8x2', null);
System.assertEquals(2, created.size());
TestingUse ClientFactory with default mock values to get coverage without callouts.