Adding and committing a Directory using the API
Posted: Thu Oct 29, 2009 1:05 am
I would like to add a directory to Vault and commit this operation using the API.
With little effort I am able to add and commit files to vault using this code:
But what I would really like to do is:
Is there any way to the above or do I need to run though the directory and its children and build up the ChangeSetItemColl and the commit it?
Thanks
With little effort I am able to add and commit files to vault using this code:
Code: Select all
ChangeSetItemColl changeSetItemColl = ServerOperations.ProcessCommandAdd(pathDirectory, new[] { path });
ServerOperations.ProcessCommandCommit(changeSetItemColl, UnchangedHandler.Checkin, false, LocalCopyType.Leave, false);
Code: Select all
ChangeSetItemColl changeSetItemColl = ServerOperations.ProcessCommandAdd(pathDirectory); // Add the path of the directory that we want to commit.
ServerOperations.ProcessCommandCommit(changeSetItemColl, UnchangedHandler.Checkin, false, LocalCopyType.Leave, false);
Thanks