public static void EnsureFileDirectoryExists(string filename) { EnsureDirectoryExists(Path.GetDirectoryName(filename)); }