Update the record for a stream in the repository
Namespace: Perforce.P4Assembly: p4api.net (in p4api.net.dll) Version: 2015.1.103.4687 (2015.1.103.4687)
Syntax
C# |
---|
public Stream UpdateStream( Stream stream, Options options ) |
Visual Basic |
---|
Public Function UpdateStream ( _ stream As Stream, _ options As Options _ ) As Stream |
Visual C++ |
---|
public: Stream^ UpdateStream( Stream^ stream, Options^ options ) |
Parameters
- stream
- Type: Perforce.P4..::..Stream
Stream specification for the stream being updated
- options
- Type: Perforce.P4..::..Options
Return Value
The Stream object if new stream was saved, null if creation failed
Examples
To update a locked stream when connected as an admin user:
CopyC#

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 ));