bool map_file_name(ref string path, string from, string to) { if (!path.StartsWith (from)) return false; path = Path.Combine (to, path.Substring (from.Length + 1)); return true; }