[Facades] Use the Open.snk key for the System.ValueTuple facade (#4173)
[mono-project.git] / docs / HtmlAgilityPack / IOLibrary.cs
blob031040ded9a3994a2ea0914eaf4b5778b8c18b02
1 // HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
2 using System.IO;
4 namespace HtmlAgilityPack
6 internal struct IOLibrary
8 #region Internal Methods
10 internal static void CopyAlways(string source, string target)
12 if (!File.Exists(source))
13 return;
14 Directory.CreateDirectory(Path.GetDirectoryName(target));
15 MakeWritable(target);
16 File.Copy(source, target, true);
19 internal static void MakeWritable(string path)
21 if (!File.Exists(path))
22 return;
23 File.SetAttributes(path, File.GetAttributes(path) & ~FileAttributes.ReadOnly);
26 #endregion