# filepath

> Cross-platform file path manipulation for Haskell

Source: https://talira.ai/catalog/filepath-rshd9d9h
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / filesystem](https://talira.ai/categories/libraries/filesystem)
- Platforms: linux, macos, windows[^2]
- Licence: BSD-3-Clause[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]

filepath is the Haskell library for manipulating file paths in a cross-platform way: splitting and joining paths, extensions, directories and drives, with the rules for POSIX and Windows paths. It ships with [Haskell](https://talira.ai/catalog/haskell-jjq1dx6f.md)'s GHC and offers two interfaces: the legacy `FilePath` (a `String`) and the recommended `OsPath`, an operating-system-encoded `ShortByteString` that handles paths correctly. Its companion [directory](https://talira.ai/catalog/directory-fezs5ryy.md) uses it for filesystem operations.

## Links

- GitHub: https://github.com/haskell/filepath
- Docs: https://hackage.haskell.org/package/filepath

## Problems it solves

- join and split file paths portably in Haskell code
- change a file's extension or get its directory name in Haskell
- handle file paths with non-UTF-8 names correctly in Haskell

## Features

- Split, join and normalise paths
- Extension and directory helpers
- POSIX and Windows path rules
- OsPath type with platform-native encoding
- Ships with GHC

## Trust

Overall: 0.24 out of 1.
Signals: maintenance 0.27, adoption 0.38, momentum 0.05, community 0.62, backing 0.00, extensibility 0.00.

- latest release v1.5.5.0 10 months ago
- 74 GitHub stars
- 35 contributors

Warnings:

- last commit 10 months ago

## Alternatives

- [fsnotify (Haskell)](https://talira.ai/catalog/fsnotify-haskell-76hzncpt.md): Cross-platform file change notifications for Haskell
- [directory](https://talira.ai/catalog/directory-fezs5ryy.md): Platform-agnostic library for filesystem operations in Haskell
- [path-io](https://talira.ai/catalog/path-io-cd6v9kt6.md): Filesystem operations for Haskell's typed path library

## Sources

[^1]: https://github.com/haskell/filepath/blob/master/LICENSE (checked 25 Nov 2026)
[^2]: https://hackage.haskell.org/package/filepath (checked 25 Nov 2026)
