ACR_DatabaseConnector.DatabaseConnector.ExtractResource C# (CSharp) Method

ExtractResource() private static method

Extract a resource to disk.
private static ExtractResource ( string FileName, byte ResourceData ) : string
FileName string Supplies a file name of the resource to /// extract (the base name only, i.e. PLINK.EXE).
ResourceData byte Supplies the data to write to disk. ///
return string
        private static string ExtractResource(string FileName, byte[] ResourceData)
        {
            string TempPath = Path.GetTempPath() + "NWN2ACR";

            if (!Directory.Exists(TempPath))
                Directory.CreateDirectory(TempPath);

            string ResPath = TempPath + Path.DirectorySeparatorChar + FileName;

            File.WriteAllBytes(ResPath, ResourceData);
            return ResPath;
        }