How do I get checked out files information?

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
Tanguy
Posts: 23
Joined: Fri Oct 18, 2013 1:18 pm

How do I get checked out files information?

Post by Tanguy » Wed Jul 13, 2016 2:18 am

I want to get the information of files that are checked out.
The code below loops through each file of checkouts.

Problem: the only (file) properties I can access are FileId and CheckOutUsers.

Expectation: I need to get File Name and additional info if available.

Code: Select all

VaultClientCheckOutList chList = ServerOperations.ProcessCommandListCheckOuts();
foreach (var item in chList.Cast<VaultClientCheckOutItem>().ToList())
{
   list.Add(item.FileID.ToString());
}

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: How do I get checked out files information?

Post by jclausius » Wed Jul 13, 2016 9:04 am

Take a look at the array of VaultClientCheckOutItem.VaultCheckOutUser[]. Hopefully the RepPath property of the VaultCheckOutUser gives you what you need.
Jeff Clausius
SourceGear

Tanguy
Posts: 23
Joined: Fri Oct 18, 2013 1:18 pm

Re: How do I get checked out files information?

Post by Tanguy » Thu Jul 14, 2016 12:47 am

Thank you Jeff
That is exactly what I was looking for. ;)

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: How do I get checked out files information?

Post by jclausius » Thu Jul 14, 2016 7:06 am

Your welcome.
Jeff Clausius
SourceGear

Post Reply