public Folder AddFolder(string name, long parentId, bool isLibrary) { object[] results = this.Invoke("AddFolder", new object[] { name, parentId, isLibrary}); return ((Folder)(results[0])); }
private int CreateFolder(DocumentService docSrv, string folderpath) { String[] foldernames; char[] delimiterChars = { '/' }; foldernames = folderpath.Split('/'); String thisPath = ""; Folder filefolder; Folder thisfolder; thisfolder = docSrv.GetFolderRoot(); foreach (String foldername in foldernames) { if (foldername == "$") { thisfolder = docSrv.GetFolderRoot(); thisPath = "$"; } else { thisPath += "/"; thisPath += foldername; try { filefolder = docSrv.GetFolderByPath(thisPath); } catch { //Console.WriteLine("Creating folder " + thisPath); filefolder = docSrv.AddFolder(foldername, thisfolder.Id, thisfolder.IsLib); } thisfolder = filefolder; } } return 0; }