1 Reply Latest reply on Apr 22, 2008 2:47 PM by 508001

    Creating folder hierarchy in one WS call

      Hi all!
      is there a way to create a folder hierarchy in one WS call when folders are all in one level hierarchy? i.e. /existingPath/newDir1/newDir2/newDir3

      fileManager.createFolders( existingPathItem.getId(), PASSING ALL NEW FOLDER NAMES here )

      ..or is the only way is to call createFolder multiple times ?

        • 1. Re: Creating folder hierarchy in one WS call
          I do something like.

          Create an Array List
          Populate the Array list witht eh folder names

          ArrayList<NamedValueSet> foldersList = new ArrayList<NamedValueSet>();

          foldersList.add(new NamedValueSet(new NamedValue[]{
          new NamedValue(Attributes.NAME, foldersRow.getFolderName()),
          new NamedValue(Attributes.DESCRIPTION,foldersRow.getStageDesc())

          NamedValueSet[] foldersSet = foldersList.toArray(new NamedValueSet[1]);

          Item[] stageFolder = fileM.createFolders(new long[] {paperFolder.getId()},
          null );

          Hop this helps.