Vault Client API - Get local file location for a checked out

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
Jim Cline

Vault Client API - Get local file location for a checked out

Post by Jim Cline » Fri Feb 27, 2004 10:30 am

I checked out a file using the following, similar to the VaultCmdLine code

client.CheckOut(vaultFile,VaultCheckOutType.Exclusive,"");
client.Get(vaultFile, true, MakeWritableType.MakeAllFilesWritable, SetFileTimeType.CheckIn,MergeType.OverwriteWorkingCopy);

How then can I tell where it put the file locally?

Thanks,
Jim

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Fri Feb 27, 2004 11:23 am

Get will always put the files it downloads in the working folder of its parent folder. If the parent folder doesn't have a working folder explicitly set for it, it uses the inherited path of its parent, and so on.

You can map any VaultClientFile to its path on disk by calling client.TreeCache.PhysicalPath(vaultFile), which will return a string.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

Jim Cline

Thanks!

Post by Jim Cline » Fri Feb 27, 2004 12:16 pm

Actually, I figured that out but thanks for confirming it for me. Now, I need to figure out how to make it check it back in...

Jim Cline

How to check back in?

Post by Jim Cline » Fri Feb 27, 2004 1:04 pm

I have modified the file locally and now want to check it back in. I call get InternalChangeSet_GetItems, find the one that corresponds to my file, and add that to the collection that is passed to the Commit. But it does not do anything???

-Jim

Post Reply