Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System.IO;
namespace HtmlAgilityPack
{
internal struct IOLibrary
{
#region Internal Methods
internal static void CopyAlways(string source, string target)
{
if (!File.Exists(source))
return;
Directory.CreateDirectory(Path.GetDirectoryName(target));
MakeWritable(target);
File.Copy(source, target, true);
}
internal static void MakeWritable(string path)
{
if (!File.Exists(path))
return;
File.SetAttributes(path, File.GetAttributes(path) & ~FileAttributes.ReadOnly);
}
#endregion
}
}