RepositoryUpdateStream Method (Stream, Options)
|
Update the record for a stream in the repository
Namespace:
Perforce.P4
Assembly:
p4api.net (in p4api.net.dll) Version: 2024.2.269.3570
Syntax public Stream UpdateStream(
Stream stream,
Options options
)
Public Function UpdateStream (
stream As Stream,
options As Options
) As Stream
public:
Stream^ UpdateStream(
Stream^ stream,
Options^ options
)
member UpdateStream :
stream : Stream *
options : Options -> Stream
Parameters
- stream
- Type: Perforce.P4Stream
Stream specification for the stream being updated - options
- Type: Perforce.P4Options
options/flags
Return Value
Type:
StreamThe 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");
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