public static int UpdateFileBinaryContent(int packageId, string path, byte[] content)
        {
            // check account
            int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);

            if (accountCheck < 0)
            {
                return(accountCheck);
            }

            // check package
            int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive);

            if (packageCheck < 0)
            {
                return(packageCheck);
            }

            // place log record
            TaskManager.StartTask("FILES", "UPDATE_BINARY_CONTENT", path, packageId);

            try
            {
                OS.OperatingSystem os       = GetOS(packageId);
                string             fullPath = GetFullPackagePath(packageId, path);

                // create file
                os.UpdateFileBinaryContent(fullPath, content);

                return(0);
            }
            catch (Exception ex)
            {
                throw TaskManager.WriteError(ex);
            }
            finally
            {
                TaskManager.CompleteTask();
            }
        }