I'm not an expert in P4.NET and I would like to show perforce's depot in a treeview (windowsform application c#)...
* "p4 dirs" to get all depots => p4 dirs "//*" for exemple this may give depot1 depot2 ..etc
P4Connection p4 = new P4Connection();
p4.Connect();
P4RecordSet tab1 = p4.Run("dirs","//depot/*"); // to get folders in depot
foreach (P4Record a in tab1 )
{
richTextBox1.Text += (a["dir"]) + "\n";// show the results in richTextBox
}
* To get a list of files in a directory, run fstat=> p4 fstat "//depot1/*"
P4RecordSet tab2 = p4.Run("fstat","//depot/your_folder/*"); // to get files existing in your_folder
foreach (P4Record b in tab2 )
{
richTextBox1.Text += (b["depotFile"]) + "\n";// show the results in richTextBox
}
now, how to use this code to build a treeview ? Any help would be most welcome