## p4get-clientopenfiles ## aaron bockelie <# .SYNOPSIS Returns all open files for a given clientspec .DESCRIPTION This function simply returns the a list of opened files for a given client in an object, for further processing. .EXAMPLE This example returns all open files for client 'voltron2' [PS] C:\Users\aaronadmin>p4get-clientopenfiles voltron2 client openedfiles ------ -------- voltron2 {@{depotFile=//depot/servi... The returned object contains the following objects: client: the name of the client operated against. files: an array of depot files that are opened for the given client. .PARAMETER clientname The client you wish to get a report on all files. .FUNCTIONALITY This function simplifies the overhead of listing files for a given client. #> Function p4get-clientopenfiles {param([Parameter(Mandatory = $true)]$clientname)#begin function p4remove-object $servercheck = p4get-server $errorprefs = $erroractionpreference #store original error action preference. $ErrorActionPreference = "Continue" if ($servercheck.pingsuccess.equals($true)) { $clientopenfiles = $null $client = $null $client = p4get-client $clientname if ($client -ne $null) { $clientopenfiles = p4get "opened -C" $client.client } } return new-object psobject -property @{"client" = $client.client;"openedfiles" = $clientopenfiles} $erroractionpreference = $errorprefs }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 8410 | Aaron Bockelie |
Root checkin, Perforce Powershell wrapper. Still lots of work to be done, namely documentation and deployment tools, for instance, get-help needs work on the majority of these tools. Additionally, the /lib structure needs a little bit of condensation, probably into major groups (depot, userspec, clientspec, group management, and so on) that way function family can exist under each resource. |