AGS.Plugin.Lua.LuaForAGSEditorComponent.TryCopySiblingFileTo C# (CSharp) Метод

TryCopySiblingFileTo() приватный Метод

private TryCopySiblingFileTo ( string name, string folder ) : bool
name string
folder string
Результат bool
        private bool TryCopySiblingFileTo(string name, string folder)
        {
            if (File.Exists(Path.Combine(folder, name)))
            {
                return false;
            }
            string thisDllPath = this.GetType().Assembly.Location;
            string fromPath = Path.Combine(Path.GetDirectoryName(thisDllPath), name);
            string toPath = Path.Combine(folder, name);
            try
            {
                File.Copy(fromPath, toPath);
            }
            catch
            {
                return false;
            }
            return true;
        }