Get a list of clients from the repository
Namespace: Perforce.P4Assembly: p4api.net (in p4api.net.dll) Version: 2015.1.103.4687 (2015.1.103.4687)
Syntax
C# |
---|
public IList<Client> GetClients( Options options ) |
Visual Basic |
---|
Public Function GetClients ( _ options As Options _ ) As IList(Of Client) |
Visual C++ |
---|
public: IList<Client^>^ GetClients( Options^ options ) |
Parameters
- options
- Type: Perforce.P4..::..Options
options for the clients commandClientsCmdOptions
Return Value
A list containing the matching clients
Remarks
p4 help clients
clients -- Display list of clients
workspaces -- synonym for 'clients'
p4 clients [-t] [-u user] [[-e|-E] nameFilter -m max] [-S stream]
[-a | -s serverID]
p4 clients -U
Lists all client workspaces currently defined in the server.
The -t flag displays the time as well as the date.
The -u user flag lists client workspaces that are owned by the
specified user.
The -e nameFilter flag lists workspaces with a name that matches
the nameFilter pattern, for example: -e 'svr-dev-rel*'. -E makes
the matching case-insensitive.
The -m max flag limits output to the specified number of workspaces.
The -S stream flag limits output to the client workspaces dedicated
to the stream.
The -U flag lists unloaded clients (see 'p4 help unload').
The -a flag specifies that all clients should be displayed, not just
those that are bound to this server.
The -s serverID flag specifies that only those clients bound to the
specified serverID should be displayed. On an Edge Server, the -s
flag defaults to the Edge Server's serverID.
Examples
To get a list of a maximum of 10 clients:
CopyC#
To get a list of clients that have "iOS_app" in their name:
CopyC#
To get a list of clients that can be used with stream //depot/main:
CopyC#
To get a list clients owned by user bsmith:
CopyC#

ClientsCmdOptions opts = new ClientsCmdOptions(ClientsCmdFlags.NoneIncludeTime, null, null, 10, null)); IList<Client> clients = Repository.GetClients(opts);

ClientsCmdOptions opts = new ClientsCmdOptions(ClientsCmdFlags.NoneIncludeTime, null, "*iOS_app*, 0, null)); IList<Client> clients = Repository.GetClients(opts);

ClientsCmdOptions opts = new ClientsCmdOptions(ClientsCmdFlags.NoneIncludeTime, null, null, 0, "//depot/main")); IList<Client> clients = Repository.GetClients(opts);

ClientsCmdOptions opts = new ClientsCmdOptions(ClientsCmdFlags.NoneIncludeTime, "bsmith", null, 0, null)); IList<Client> clients = Repository.GetClients(opts);