i have a piece of code here that breaks if the directory doesn't exist
System.IO.File.WriteAllText(filePath, content);
is it possible to do in one line (or a few lines) to check the directory leading to the new file doesn't exist and if not, to create it before creating the new file.
i'm in .NET 3.5 here.