Microsoft.TeamFoundation.VersionControl.Client.TfsPath.FromPlatformPath C# (CSharp) Method

FromPlatformPath() public static method

public static FromPlatformPath ( string path ) : string
path string
return string
        public static string FromPlatformPath(string path)
        {
            if (String.IsNullOrEmpty(path))
                return path;

            // TFS servers corrupt *nix type paths
            if (!isRunningOnUnix)
                return path;
            return "U:" + path.Replace('/', '\\'); //Use U: like git-tf
        }

Usage Example

 internal XElement ToXml(XNamespace ns)
 {
     return(new XElement(ns + "WorkingFolder",
                         new XAttribute("local", TfsPath.FromPlatformPath(LocalItem)),
                         new XAttribute("item", ServerItem),
                         new XAttribute("type", this.Type.ToString())));
 }
All Usage Examples Of Microsoft.TeamFoundation.VersionControl.Client.TfsPath::FromPlatformPath