private function move($destination, $tmp, $filename)
    {
        if (!is_dir($destination)) {
            // We can either create it automatically
            if ($this->destinationAutoCreate === true) {
                // Then make a directory (recursively if needed)
                @mkdir($destination, 0777, true);
                
            } else {
                // Destination doesn't exist, and we shouldn't be creating it
                throw new RuntimeException(sprintf(
                    'Destination folder does not exist', $destination
                ));
            }
        }

        $target = sprintf('%s/%s', $destination, $filename);

        // If Remote file exists and we don't want to override it, so let's stop here
        if (is_file($target)) {
            if (!$this->override) {
                return true;
            }
        }

        return move_uploaded_file($tmp, $target);
    }
private function move($destination, $tmp, $filename)
    {
        if (!is_dir($destination)) {
            // We can either create it automatically
            if ($this->destinationAutoCreate === true) {
                // Then make a directory (recursively if needed)
                @mkdir($destination, 0777, true);
                
            } else {
                // Destination doesn't exist, and we shouldn't be creating it
                throw new RuntimeException(sprintf(
                    'Destination folder does not exist', $destination
                ));
            }
        }

        $target = sprintf('%s/%s', $destination, $filename);

        // If Remote file exists and we don't want to override it, so let's stop here
        if (is_file($target)) {
            if (!$this->override) {
                return true;
            }
        }

        return move_uploaded_file($tmp, $target);
    }
private function move ( $ destination , $ tmp , $ filename ) { if ( ! is_dir ( $ destination ) ) { // We can either create it automatically if ( $ this -> destinationAutoCreate === true ) { // Then make a directory (recursively if needed) @ mkdir ( $ destination , 0777 , true ) ; } else { // Destination doesn't exist, and we shouldn't be creating it throw new RuntimeException ( sprintf ( 'Destination folder does not exist' , $ destination ) ) ; } } $ target = sprintf ( '%s/%s' , $ destination , $ filename ) ; // If Remote file exists and we don't want to override it, so let's stop here if ( is_file ( $ target ) ) { if ( ! $ this -> override ) { return true ; } } return move_uploaded_file ( $ tmp , $ target ) ; }
Moves a singular file

@param string $destination
@param string $tmp
@param string $filename
@return boolean Depending on success
Moves a singular file