Click or drag to resize

RepositoryGetStreams Method

Get a list of streams from the repository

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2023.2.258.5793
Syntax
public IList<Stream> GetStreams(
	Options options,
	params FileSpec[] files
)

Parameters

options
Type: Perforce.P4Options
options for the streams commandStreamsCmdOptions
files
Type: Perforce.P4FileSpec
files to filter results by

Return Value

Type: IListStream
A list containing the matching streams
Remarks

p4 help streams

streams -- Display list of streams

p4 streams [-U -F filter -T fields -m max] --viewmatch [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').

The --viewmatch flag returns the stream name, depot path,
and stream view path of the streams that have views containing
the given depot files.

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