diff --git a/p4mono/P4Shell/P4Shell.cs b/p4mono/P4Shell/P4Shell.cs index 8b4414e..098cb6f 100644 --- a/p4mono/P4Shell/P4Shell.cs +++ b/p4mono/P4Shell/P4Shell.cs @@ -241,10 +241,26 @@ public string[] Files( string wildcard ){ return files.ToArray(); - } - - - + } + + public bool CopyFile(string localPath, string depotPath) + { + var result = false; + var stdout = String.Empty; + if (!loggedIn) + Login(username, password); + try + { + env.ExecuteThrow("p4", new string[] { "print", "-o", localPath, depotPath }, out stdout); + result = true; + } + catch (ApplicationException e) + { + Console.Error.WriteLine(e.Message); + } + return result; + } + public string[] Edit( string wildcard ){ string stdout = String.Empty; if ( !loggedIn )