Click or drag to resize

RepositoryUpdateStream Method (Stream, Options)

Update the record for a stream in the repository

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2023.2.258.5793
Syntax
public Stream UpdateStream(
	Stream stream,
	Options options
)

Parameters

stream
Type: Perforce.P4Stream
Stream specification for the stream being updated
options
Type: Perforce.P4Options
options/flags

Return Value

Type: Stream
The Stream object if new stream was saved, null if creation failed
Examples
To update a locked stream when connected as an admin user:
Stream streamToUpdate = rep.GetStream("//Rocket/GUI");
// set locked option
streamToUpdate.Options |= StreamOption.Locked;
streamToUpdate = rep.UpdateStream(streamToUpdate);
streamToUpdate.Description = "edited";
string parent = streamToUpdate.Parent.ToString();
string type = streamToUpdate.Type.ToString();
streamToUpdate = rep.UpdateStream(streamToUpdate,
  new StreamCmdOptions(StreamCmdFlags.Force, parent, type ));
See Also