sdl2-2.5.5.1: Both high- and low-level bindings to the SDL library (version 2.0.6+).

Safe Haskell | None
Language | Haskell2010

SDL.Filesystem

Contents

- Filesystem Paths

Synopsis

- getBasePath :: MonadIO m => m Text
- getPrefPath :: MonadIO m => Text -> Text -> m Text

# Filesystem Paths

getBasePath :: MonadIO m => m Text Source #

An absolute path to the application data directory.

The path is guaranteed to end with a path separator.

Throws `SDLException` on failure, or if the platform does not implement this functionality.

getPrefPath :: MonadIO m => Text -> Text -> m Text Source #

A path to a unique per user and per application directory for the given organization and application name, intended for writing preferences and other personal files.

The path is guaranteed to end with a path separator.

You should assume the path returned by this function is the only safe place to write files to.

Throws `SDLException` on failure.