Get a list of streams from the repository

Namespace: Perforce.P4
Assembly: p4api.net (in p4api.net.dll) Version: 2017.3.160.836 (2017.3.160.0836)

Syntax

C#
public IList<Stream> GetStreams(
	Options options,
	params FileSpec[] files
)
Visual Basic
Public Function GetStreams ( _
	options As Options, _
	ParamArray files As FileSpec() _
) As IList(Of Stream)
Visual C++
public:
IList<Stream^>^ GetStreams(
	Options^ options, 
	... array<FileSpec^>^ files
)

Parameters

options
Type: Perforce.P4..::..Options
options for the streams commandStreamsCmdOptions
files
Type: array<Perforce.P4..::..FileSpec>[]()[][]
files to filter results by

Return Value

A list containing the matching streams

Remarks


p4 help streams

streams -- Display list of streams

p4 streams [-U -F filter -T fields -m max] [streamPath ...]

Reports the list of all streams currently known to the system. If
a 'streamPath' argument is specified, the list of streams is limited
to those matching the supplied path. Unloaded task streams are not
listed by default.

For each stream, a single line of output lists the stream depot path,
the type, the parent stream depot path, and the stream name.

The -F filter flag limits the output to files satisfying the expression
given as 'filter'. This filter expression is similar to the one used
by 'jobs -e jobview', except that fields must match those above and
are case sensitive.

e.g. -F "Parent=//Ace/MAIN & Type=development"

Note: the filtering takes place post-compute phase; there are no
indexes to optimize performance.

The -T fields flag (used with tagged output) limits the fields output
to those specified by a list given as 'fields'. These field names can
be separated by a space or a comma.

e.g. -T "Stream, Owner"

The -m max flag limits output to the first 'max' number of streams.

The -U flag lists unloaded task streams (see 'p4 help unload').

Examples

To get the first 3 development type streams with the parent //flow/mainline:
CopyC#
IList<Stream> = rep.GetStreams(new Options(StreamsCmdFlags.None,
           "Parent=//flow/mainline & Type=development", null, "//...", 3));

See Also