Fastest way to trim text in all files
<p>I have a function to trim all the text in all files in a directory. Here is the code</p>

<pre><code>var dbtables = System.IO.Directory.GetFiles(db);

foreach(var table in dbtables)
{
     string text = File.ReadAllText(table);
     File.WriteAllText(table, text.Trim());
}
</code></pre>

<p>There are many large files in this directory and it takes about 30 minutes to complete. Do you know of a faster way to do this?</p>
