There isn’t a built in method of checking if a file is shared. (As of EPDM 2014.) Here is a small method to check whether or not a file is shared;
private static bool IsFileShared(EdmVault5Class vault, string filename)
{
if (vault == null)
throw new ArgumentNullException("vault", "Vault cannot be null!");
IEdmFolder5 folder = default(IEdmFolder5);
IEdmFile5 file = vault.GetFileFromPath(filename, out folder);
if (file == null)
return false;
string folderPath = folder.LocalPath;
IEdmPos5 pos = file.GetFirstFolderPosition();
while (!pos.IsNull)
{
IEdmFolder5 nextFolder = file.GetNextFolder(pos);
if (nextFolder != null && nextFolder.LocalPath != folderPath)
return true;
}
return false;
}
