Page 1 of 1

List of shared paths

Posted: Mon Jul 28, 2008 12:42 am
by andreypir
Which API function can I use to get a list of paths where a file is shared? The list is shown on the Share Links tab of file properties in the Vault client. I tried this:

string[] GetSharedPath(VaultClientFile file)
{
VaultFileProperties prop = file.GetFileProperties();
return prop.SharedPaths;
}

but this always returns null. I also tried

string[] GetSharedPath(VaultClientFile file)
{
return ServerOperations.client.ClientInstance.GetSharedPaths(file.ID);
}

but this returns empty array. Version 4.1.2.

Re: List of shared paths

Posted: Mon Jul 28, 2008 1:35 pm
by shannon
Try getting the file properties this way:
_clientInstance.GetFileProperties(serverPath, file.ObjVerID)

Re: List of shared paths

Posted: Tue Jul 29, 2008 4:53 pm
by andreypir
Thank you, that works

Re: List of shared paths

Posted: Thu Aug 07, 2008 8:15 am
by lbauer
Let us know if you have additional questions.

Re: List of shared paths

Posted: Mon Jan 25, 2010 6:05 am
by javaguy
I'm in a similar position. Interestingly ServerOperations.client.ClientInstance.GetSharedPaths(file.ID) seemed to work
fine until I restarted my Vault server.

Could you explain the serverPath parameter please? I've tried a few things and keep getting an exception on the call.

Re: List of shared paths

Posted: Mon Jan 25, 2010 8:15 am
by shannon
It's whatever repository path the server would understand for that file. For most files, the server and the client agree on the repository path, but complications occur if you have uncommitted changes (i.e. a rename or move) for that file.

We pass file.ServerSynchedFullPath, give that a try.