<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[`MetadataCache`](MetadataCache) › [`getFirstLinkpathDest`](MetadataCache/getFirstLinkpathDest)
## MetadataCache.getFirstLinkpathDest() method
Get the best match for a linkpath.
**Signature:**
```typescript
getFirstLinkpathDest(linkpath: string, sourcePath: string): TFile | null;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| <code>linkpath</code> | <code>string</code> | |
| <code>sourcePath</code> | <code>string</code> | |
**Returns:**
[`TFile`](TFile)` | null`