Find UID of the specified message sequence ID

@param int    $id     Message (sequence) ID
@param string $folder Folder name

@return int Message UID
773738
public function id2uid($id, $folder = null)
    {
        if (!strlen($folder)) {
            $folder = $this->folder;
        }

        if (!$this->check_connection()) {
            return null;
        }

        return $this->conn->ID2UID($folder, $id);
    }
714330
public function getPathForDocument($id)
    {
        if(!$this->validateId($id)) {
            throw new \Exception(sprintf('`%s` is not a valid document ID.', $id));
        }

        return $this->path . DIRECTORY_SEPARATOR . $this->getFilename($id);
    }
605486
public function getPathForDocument($id)
    {
        if(!$this->validateId($id)) {
            throw new \Exception(sprintf('`%s` is not a valid document ID.', $id));
        }

        if($this->isNestedId($id)) {
            $path = DIRECTORY_SEPARATOR . str_replace(self::SEPERATOR, DIRECTORY_SEPARATOR, dirname($id));
        } else {
            $path = '';
        }

        return  $this->path . $path . DIRECTORY_SEPARATOR . $this->getFilename($id);
    }
1078516
private function getFolderById(int $folderId): \stdClass
    {
        $folder = Craft::$app->assets->getFolderById($folderId);
        if ($folder) {
            $volume = $folder->getVolume();
            return  (object) [
                'id' => $folderId,
                'handle' => $volume->handle
            ];
        }
        return null;
    }
490720
public function getMessage($type, $id = null)
    {
        $result = null;
        if (null === $id) {
            if (array_key_exists($type, $this->messages)) {
                $result = $this->messages[$type];

                if (!$this->persistMessages) {
                    unset($this->messages[$type]);
                }
            }
        }

        if (null !== $id) {
            if (array_key_exists($type, $this->messages)) {
                if (array_key_exists($id, $this->messages[$type])) {
                    $result = $this->messages[$type][$id];
                    if (!$this->persistMessages) {
                        unset($this->messages[$type][$id]);
                    }
                }
            }
        }

        return $result;
    }
1233601
public function filename($id)
    {
        if (isset($this->filenameCache[$id])) {
            return $this->filenameCache[$id];
        }

        $dir = $this->dir;
        $filename = $id;

        if ($this->subDirs) {
            $parts = explode(CacheCache\Cache::$namespaceSeparator, $id);
            $filename = array_pop($parts);
            $dir .= DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $parts);
            if (!file_exists($dir)) {
                mkdir($dir, 0777, true);
            }
        }

        if (!$this->idAsFilename) {
            $filename = md5($filename);
        }

        if (!empty($this->fileExtension)) {
            $filename .= $this->fileExtension;
        }

        $filename = $dir . DIRECTORY_SEPARATOR . $filename;
        $this->filenameCache[$id] = $filename;
        return $filename;
    }
52283
def get_folder_by_id(self, folder_id):
        
        endpoint = 'https://outlook.office.com/api/v2.0/me/MailFolders/' + folder_id

        r = requests.get(endpoint, headers=self._headers)

        check_response(r)
        return_folder = r.json()
        return Folder._json_to_folder(self, return_folder)
1328147
public function get($id) {
        $id=($id==='')?"0":$id;
        if (!isset($this->items[$id])) {
            return new MessageItem(); // we returns an empty error.
        }
        return $this->items[$id];
    }
723652
protected function getMessageHeader($id) {
        $count = $this->countMessages();
        for ($i=1;$i<=$count;$i++) {
            $uid = imap_uid($this->imap, $i);
            if ($uid==$id) {
                $header = imap_headerinfo($this->imap, $i);
                return $header;
            }
        }
        return false;
    }
233900
public function findByFolderId($folderId)
    {
        $qb = $this->createQueryBuilder();

        $qb->field('mediaFolder.id')->equals($folderId);

        return $qb->getQuery()->execute();
    }
718345
public function getParentId($id)
    {
        $path = $this->getProperty($id, self::PATH);
        array_pop($path);

        return empty($path)
            ? null // the given item is the root
            : array_pop($path);
    }
1132739
private function doDeleteFolder(FolderInterface $folder, $userId)
    {
        foreach ($this->findFoldersByParentFolder($folder) as $subFolder) {
            $this->deleteFolder($subFolder, $userId);
        }

        foreach ($this->findFilesByFolder($folder) as $file) {
            $this->deleteFile($file, $userId);
        }

        $event = new FolderEvent($folder);
        if ($this->eventDispatcher->dispatch(VolumeEvents::BEFORE_DELETE_FOLDER, $event)->isPropagationStopped()) {
            throw new IOException("Delete folder {$folder->getName()} cancelled.");
        }

        $this->driver->deleteFolder($folder, $userId);

        $event = new FolderEvent($folder);
        $this->eventDispatcher->dispatch(VolumeEvents::DELETE_FOLDER, $event);

        return $folder;
    }
1335509
private function _checkIdArgument($id)
    {
        $id = strtoupper($id);
        $length = strlen($id);

        if ($length === 15) {
            return $this->_generateShortType($id);
        } elseif ($length === 18) {
            return $this->_generatelongType($id);
        }

        return false;
    }
1275598
public function GetID($ID, $DatasetType = FALSE) {
      $Result = $this->GetWhere(array("MessageID" => $ID))->FirstRow($DatasetType);
      return $Result;
   }
571923
public function getQuestion4Id($id)
    {
        $query = $this->createQueryBuilder('p')
            ->select('p')
            ->where('p.id = :id')
            ->setParameter('id', $id)
            ->getQuery();


        return $query->getOneOrNullResult();
    }
314971
static function get_manager( $id ) {
            $id = strtolower( $id );

            if ( ! isset( self::$_MANAGERS[ $id ] ) ) {
                self::$_MANAGERS[ $id ] = new FS_Cache_Manager( $id );
            }

            return self::$_MANAGERS[ $id ];
        }
1074499
public function getItemById($id)
    {
        $items = $this->getItems();
        if (isset($items[$id])) {
            return $items[$id];
        }

        return null;
    }