> For the complete documentation index, see [llms.txt](https://docs.pokeb.ag/data-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pokeb.ag/data-sdk/low-level-api/getdirectory.md).

# getDirectory

`getDirectory` allows the retrieval of the contents of a directory within the dataset at a particular patch version. If not provided with a specific version, this method returns the dataset for the latest patch.

The directories currently available are:

* `held-items`
* `pokemon`
* `skills`

```javascript
import { getDirectory } from '@pokebag/data-sdk'

async function listPokemonInPatch(patchVersion) {
  const FILES = await getDirectory('pokemon', patchVersion)

  console.log(FILES)
}

listPokemonInPatch('1.1.1.6')
// Logs an array of filenames within the pokemon directory up to patch 1.1.1.6:
// ['absol.json', 'alolan-ninetales.json', 'blissey.json', 'charizard.json', 'cinderace.json', etc.]
```
