Jump to content


P4API.Net "p4 streams -U" equivalent

.net streams unloaded

  • Please log in to reply
4 replies to this topic

#1 Elliott Lock

Elliott Lock

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 22 October 2017 - 07:22 PM

Hi,

I'm in C# and running a command:

IList<Stream> streams = mRepository.GetStreams(new Options(StreamsCmdFlags.None, null, null, null, 0), null);

Which successfully get a list of streams. What I wanted to know is, how can I modify this command to only collect a list of unloaded streams?

Many Thanks

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 947 posts

Posted 23 October 2017 - 01:26 AM

From the documentation it sounds like that interface doesn't support that option:

https://www.perforce...tions__ctor.htm

Much like your earlier problem with populate, the solution is probably just to use RunCommand() to send the command directly to the server.

#3 Elliott Lock

Elliott Lock

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 23 October 2017 - 10:54 AM

Yea that was what I feared. Bah! Thanks again :)

#4 p4bill

p4bill

    Advanced Member

  • Members
  • PipPipPip
  • 202 posts

Posted 23 October 2017 - 02:50 PM

You can create the options, then pass the unsupported flag into it. This should get you the equivalent of "P4 Streams -U":

Options opts = new Options();
opts["-U"] = null;
IList<Stream> streams = rep.GetStreams(opts);


#5 Elliott Lock

Elliott Lock

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 24 October 2017 - 06:46 PM

Thanks p4bill that kind of works BUT it also lists the loaded streams. Which isn't what
p4 streams -U
does. As that command only lists the unloaded streams, this is what I need. I'm so close now! :)





Also tagged with one or more of these keywords: .net, streams, unloaded

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users