BLL.Workflows.CopyPxeBinaries.CopyCommand C# (CSharp) Метод

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

private CopyCommand ( string pxeType, string mode, string sArch, string dArch, string sName, string dName ) : bool
pxeType string
mode string
sArch string
dArch string
sName string
dName string
Результат bool
        private bool CopyCommand(string pxeType, string mode, string sArch, string dArch, string sName, string dName)
        {
            var destinationRootPath = Settings.TftpPath;
            if (mode == "proxy" || (pxeType == "grub" && dArch == "efi64") || (pxeType == "winpe" && dArch == "efi64") || (pxeType == "winpe" && dArch == "efi32") || pxeType == "winpe" && dArch == "bios")
                destinationRootPath += "proxy" + Path.DirectorySeparatorChar;
            try
            {
                File.Copy(
                  _sourceRootPath + pxeType + Path.DirectorySeparatorChar + mode +
                  Path.DirectorySeparatorChar + sArch + Path.DirectorySeparatorChar + sName,
                  destinationRootPath + dArch + Path.DirectorySeparatorChar + dName, true);

                new FileOps().SetUnixPermissions(destinationRootPath + dArch + Path.DirectorySeparatorChar + dName);
            }
            catch (Exception ex)
            {
                Logger.Log(ex.Message);
                return false;
            }
            return true;
        }