Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只想知道使用 p4api 在用户本地计算机上创建的所有工作空间的位置。
例如,如果用户在以下位置映射了“MyProject”工作区:“D:\LocalPerforce\MyWS”,那么我想知道这个路径 ->“D:\LocalPerforce\MyWS”
我将获得用户的必要信息。我遇到了 GetClientFileMappings() 但不确定如何使用它或者它会有所帮助。如何在 c# 中实现这一点。
我通过以下代码解决方法实现了它:
IList<Client> clients = rep.GetClients(new Options()); localPaths.AddRange(from client in clients where !string.IsNullOrEmpty(client.OwnerName) && client.OwnerName.Contains(User) select client.Root);