ACR_DatabaseConnector.DatabaseConnector.ExtractResource C# (CSharp) 메소드

ExtractResource() 개인적인 정적인 메소드

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. ///
리턴 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;
        }