MCPcopy Create free account
hub / github.com/IceClusters/icmysql / HandleManifetst

Method HandleManifetst

library/library-changer/Program.cs:128–145  ·  view source on GitHub ↗
(string path)

Source from the content-addressed store, hash-verified

126 }
127
128 static void HandleManifetst(string path)
129 {
130 string content = File.ReadAllText(path);
131 content = content.Replace("@oxmysql/lib/MySQL", "@icmysql/library/MySQL");
132 content = content.Replace("@mysql-async/lib/MySQL", "@icmysql/library/MySQL");
133 content = content.Replace("@ghmattimysql/lib/MySQL", "@icmysql/library/MySQL");
134 content = content.Replace("oxmysql", "icmysql");
135 content = content.Replace("mysql-async", "icmysql");
136 content = content.Replace("ghmattimysql", "icmysql");
137 if (content.Contains("icmysql"))
138 {
139 string directoryName = Path.GetDirectoryName(path);
140 string[] parts = directoryName.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
141 string resourceName = parts[parts.Length - 1];
142 Console.WriteLine("Resource manifest of " + resourceName + " has been updated to use icmysql.");
143 File.WriteAllText(path, content);
144 }
145 }
146 }
147}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected