@param FsDestination $destination

@return FsConsumer
336568
public function createConsumer(Destination $destination): Consumer
    {
        InvalidDestinationException::assertDestinationInstanceOf($destination, FsDestination::class);

        $consumer = new FsConsumer($this, $destination, $this->preFetchCount);

        if ($this->pollingInterval) {
            $consumer->setPollingInterval($this->pollingInterval);
        }

        return $consumer;
    }
955702
private void deleteSystemDestination(BaseDestinationHandler destinationHandler) throws SINotPossibleInCurrentConfigurationException, SIResourceException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "deleteSystemDestination", new Object[] { destinationHandler });

        synchronized (destinationHandler)
        {
            if (destinationHandler.isToBeDeleted() || !destinationHandler.isSystem())
            {
                // Treat as if the destination does not exist.
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(
                               tc,
                               "deleteSystemDestination",
                               "Destination not found as destination is to be deleted, or is system");

                throw new SIMPNotPossibleInCurrentConfigurationException(
                                nls_cwsik.getFormattedMessage(
                                                              "DELETE_SYSTEM_DEST_ERROR_CWSIP0046",
                                                              new Object[] { destinationHandler.getName(), messageProcessor.getMessagingEngineName() }, null));
            }

            // Set the deletion flag in the DH persistently.
            ExternalAutoCommitTransaction transaction = txManager.createAutoCommitTransaction();

            destinationHandler.setToBeDeleted(true);
            destinationIndex.delete(destinationHandler);
            try
            {
                destinationHandler.requestUpdate(transaction);
            } catch (MessageStoreException e)
            {
                // MessageStoreException shouldn't occur so FFDC.
                FFDCFilter.processException(
                                            e,
                                            "com.ibm.ws.sib.processor.impl.DestinationManager.deleteSystemDestination",
                                            "1:5476:1.508.1.7",
                                            this);

                SibTr.exception(tc, e);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(tc, "deleteSystemDestination", "SIResourceException");
                throw new SIResourceException(e);
            }

            // Close all connections to the localisation
            // Ensure that before calling these methods, the destination is marked
            // to-be-deleted or is marked as deleted, to avoid any new producers and
            // consumers attaching after we have closed the currently attached ones.
            destinationHandler.closeProducers();
            destinationHandler.closeConsumers();

            //Add all the localisations to the set of those requiring clean-up
            destinationHandler.addAllLocalisationsForCleanUp();

            //Clear the set of ME's that localise the destination
            destinationHandler.clearLocalisingUuidsSet();

            startAsynchDeletion();

        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "deleteSystemDestination");
    }
164691
public function move($destination) {
		$destination = $this->getDestination($destination);

		if (@rename($this->getPathname(), $destination)) {
			$this->pathname = $destination;
		} else {
			throw new FileException(sprintf('Failed to move %s to %s', $this->pathname, $destination));
		}
	}
929879
public function setDestination($destination)
  {
    if(!preg_match('/[\/]$/', $destination))
      $destination .= '/';

    if(!is_dir($destination))
      throw new \InvalidArgumentException('Diretório $destination não encontrado.');

    $this->destination = $destination;
  }
273453
public function move(string $destination): Response {
        $uri         = $this->fedora->sanitizeUri($this->uri);
        $destination = $this->fedora->sanitizeUri($destination);
        $request     = new Request('MOVE', $uri, ['Destination' => $destination]);
        $response    = $this->fedora->sendRequest($request);
        $cache       = $this->fedora->getCache();
        $cache->deleteById($this->getId());
        $cache->add($this);
        return $response;
    }
624822
public function then(Closure $destination)
    {
        $pipeline = array_reduce(
            array_reverse($this->pipes), $this->carry(), $this->prepareDestination($destination)
        );

        return $pipeline($this->passable);
    }
1047909
public static function getSendUserSettings($destination, $account) {
    $query = \Drupal::database()->select('user_activity_send', 'uas');
    $query->fields('uas', ['message_template', 'frequency']);
    $query->condition('uas.uid', $account->id());
    $query->condition('uas.destination', $destination);
    return $query->execute()->fetchAllKeyed();
  }
409479
protected function isOutOfDate($source, $destination, array $includes = null)
    {
        $includes = (array) $includes;
        $extensions = $this->compiler->getExtensions();
        
        if (!file_exists($destination)) {
            return true;
        }
        
        if (is_file($source) && is_file($destination)) {
            $sourceFiles = array(new \SplFileInfo($source));
            $destinationFiles = array(new \SplFileInfo($destination));
        } else {
            $sourceFiles = $this->scanDirectory($source, $extensions);
            $destinationFiles = $this->scanDirectory($destination, array('css'));
        }
        
        $youngest = time();
        foreach ($sourceFiles as $key => $file) {
            if (array_key_exists($key, $destinationFiles)) {
                if ($file->getMTime() > $destinationFiles[$key]->getMTime()) {
                    return true;
                }
                if ($file->getMTime() < $youngest) {
                    $youngest = $file->getMTime();
                }
            } else {
                return true;
            }
        }
        
//         $oldest = time();
//         foreach ($destinationFiles as $file) {
//             $modified = $file->getMTime(); 
//             if ($modified < $oldest) {
//                 $oldest = $modified;
//             }
//         }
        
        foreach ($includes as $include) {
            $includeFiles = $this->scanDirectory($include, $extensions);
            foreach ($includeFiles as $file) {
                if ($file->getMTime() > $youngest) {
                    return true;
                }
            }
        }
        
        return false;
    }
263433
public static function getSendMessageTemplates($destination) {
    $email_message_templates = [];
    /** @var \Drupal\message\MessageTemplateInterface[] $message_templates */
    $message_templates = \Drupal::entityTypeManager()
      ->getStorage('message_template')
      ->loadMultiple();
    foreach ($message_templates as $message_template) {
      $destinations = $message_template->getThirdPartySetting('activity_logger', 'activity_destinations', NULL);
      if (is_array($destinations) && in_array($destination, $destinations)) {
        $email_message_templates[$message_template->id()] = $message_template->getDescription();
      }
    }
    return $email_message_templates;
  }
1141784
public function save($destination)
    {
        $fh = fopen($destination, 'wb');
        if (!$fh) {
            throw new FileOpenException('failed to open destination file: '.$destination);
        }

        if (!flock($fh, LOCK_EX | LOCK_NB, $blocked)) {
            // @codeCoverageIgnoreStart
            if ($blocked) {
                // Concurrent request has requested a lock.
                // File is being processed at the moment.
                // Warning: lock is not checked in windows.
                return false;
            }
            // @codeCoverageIgnoreEnd

            throw new FileLockException('failed to lock file: '.$destination);
        }

        $totalChunks = $this->request->getTotalChunks();

        try {
            $preProcessChunk = $this->config->getPreprocessCallback();

            for ($i = 1; $i <= $totalChunks; $i++) {
                $file = $this->getChunkPath($i);
                $chunk = fopen($file, "rb");

                if (!$chunk) {
                    throw new FileOpenException('failed to open chunk: '.$file);
                }

                if ($preProcessChunk !== null) {
                    call_user_func($preProcessChunk, $chunk);
                }

                stream_copy_to_stream($chunk, $fh);
                fclose($chunk);
            }
        } catch (\Exception $e) {
            flock($fh, LOCK_UN);
            fclose($fh);
            throw $e;
        }

        if ($this->config->getDeleteChunksOnSave()) {
            $this->deleteChunks();
        }

        flock($fh, LOCK_UN);
        fclose($fh);

        return true;
    }
666119
public function transferObjectsToAnotherTag( $destination )
    {
        if ( !$destination instanceof self )
        {
            $destination = self::fetchWithMainTranslation( (int) $destination );
            if ( !$destination instanceof self )
                return;
        }

        foreach ( $this->getTagAttributeLinks() as $tagAttributeLink )
        {
            $link = eZTagsAttributeLinkObject::fetchByObjectAttributeAndKeywordID(
                        $tagAttributeLink->attribute( 'objectattribute_id' ),
                        $tagAttributeLink->attribute( 'objectattribute_version' ),
                        $tagAttributeLink->attribute( 'object_id' ),
                        $destination->attribute( 'id' ) );

            if ( !$link instanceof eZTagsAttributeLinkObject )
            {
                $tagAttributeLink->setAttribute( 'keyword_id', $destination->attribute( 'id' ) );
                $tagAttributeLink->store();
            }
            else
            {
                $tagAttributeLink->remove();
            }
        }
    }
466626
public function match($destination) {
		if ($destination == '') {
			$destination = '/';
		}
		
		$data = $this->matcher->match($destination);
		
		// find page for matched slug
		if (array_key_exists('slug', $data)) {
// 			$data['page'] = PageQuery::create()
// 				->filterByApplication($this->options['application'])
// 				->useRouteQuery()
// 					->filterBySlug($data['slug'])
// 				->endUse()
// 				->find()
// 			;
		}
		
		// unserialize params
		if (array_key_exists('params', $data)) {
			$data['params'] = $this->unserializeParams($data['params']);
		}
		
		return $data;
	}
257823
public function file($source, $destination)
    {
        settype($source, 'array');

        $this->set($destination, true);

        $added = 0;

        foreach ($source as $file) {
            $added += (int) $this->zip->addFile($file, basename($file));
        }

        $this->zip->close();
        return count($source) == $added;
    }
1020638
public function rpoplpush($source, $destination) {
        $keys = [$source, $destination];
        return $this->returnCommand(['RPOPLPUSH'], $keys, $keys);
    }
363409
public function copy($source, $destination)  
    {
        Eden_Array_Argument::i()
            //argument 1 must be a string
            ->test(1, 'string')  
            //argument 2 must be a string
            ->test(2, 'string'); 

        $this->data[$destination] = $this->data[$source];
        return $this;
    }
830701
public static function deleteChainedRecursively($destination)
    {
        $destination = mb_strtolower(trim($destination, '/'));

        $redirectRules = RedirectRule::where('destination', $destination)->get();

        if ($redirectRules->count() > 1) {
            $message = 'There is multiple redirections with the same destination! ';
            $message .= 'Recursive delete will not continue';

            throw new \Exception($message);
        }

        $redirectRule = $redirectRules->first();

        if ($redirectRule === null) {
            return;
        }

        $nextDestination = $redirectRule->origin;

        $redirectRule->delete();

        self::deleteChainedRecursively($nextDestination);
    }
1278729
public function clone($destination)
    {
        $fs = new Filesystem;

        if (! $fs->exists($destination)) {
            $fs->mkdir($destination, 0755);
        }

        $fs->mirror($this->source, $destination, null, $this->options);
    }