Exemplo n.º 1
0
        private bool TryCopyFile(string fromFilePath, string toFilePath)
        {
            bool result;

            try
            {
                base.WriteVerbose(Strings.VerboseCopyFile(this.OwnerServer.Fqdn, fromFilePath, toFilePath));
                result = WmiWrapper.CopyFileIfExists(this.OwnerServer.Fqdn, fromFilePath, toFilePath);
            }
            catch (ManagementException ex)
            {
                base.WriteVerbose(Strings.VerboseEatUpException(ex.Message));
                TaskLogger.Trace("MoveDatabasePath.TryCopyFile raises exception: {0}", new object[]
                {
                    ex.ToString()
                });
                result = false;
            }
            return(result);
        }