1 // HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
\r
4 namespace HtmlAgilityPack
\r
6 internal struct IOLibrary
\r
8 #region Internal Methods
\r
10 internal static void CopyAlways(string source, string target)
\r
12 if (!File.Exists(source))
\r
14 Directory.CreateDirectory(Path.GetDirectoryName(target));
\r
15 MakeWritable(target);
\r
16 File.Copy(source, target, true);
\r
19 internal static void MakeWritable(string path)
\r
21 if (!File.Exists(path))
\r
23 File.SetAttributes(path, File.GetAttributes(path) & ~FileAttributes.ReadOnly);
\r