HsLua.Module.Path

hslua-module-path-1.1.1: Lua module to work with file paths.

Copyright | © 2021-2024 Albert Krewinkel
License | MIT
Maintainer | Albert Krewinkel <tarleb@hslua.org>
Safe Haskell | None
Language | Haskell2010

HsLua.Module.Path

Contents

- Module
- Fields
- Path manipulation

Description

Lua module to work with file paths.

Synopsis

- documentedModule :: LuaError e => Module e
- separator :: Field e
- search_path_separator :: Field e
- add_extension :: DocumentedFunction e
- combine :: DocumentedFunction e
- directory :: DocumentedFunction e
- filename :: DocumentedFunction e
- is_absolute :: DocumentedFunction e
- is_relative :: DocumentedFunction e
- join :: LuaError e => DocumentedFunction e
- make_relative :: DocumentedFunction e
- normalize :: DocumentedFunction e
- split :: LuaError e => DocumentedFunction e
- split_extension :: DocumentedFunction e
- split_search_path :: LuaError e => DocumentedFunction e
- treat_strings_as_paths :: LuaError e => DocumentedFunction e

# Module

documentedModule :: LuaError e => Module e #

The `path` module specification.

# Fields

separator :: Field e #

Wrapper for ``pathSeparator``.

search_path_separator :: Field e #

Wrapper for ``searchPathSeparator``.

# Path manipulation

add_extension :: DocumentedFunction e #

Adds an extension to a file path. Wraps ``addExtension``.

combine :: DocumentedFunction e #

Join two paths with a directory separator. Wraps ``combine``.

directory :: DocumentedFunction e #

See `Path.takeDirectory`

filename :: DocumentedFunction e #

See `Path.takeFilename`

is_absolute :: DocumentedFunction e #

See `Path.isAbsolute`

is_relative :: DocumentedFunction e #

See `Path.isRelative`

join :: LuaError e => DocumentedFunction e #

See `Path.joinPath`

make_relative :: DocumentedFunction e #

normalize :: DocumentedFunction e #

See `Path.normalise`

split :: LuaError e => DocumentedFunction e #

See `Path.splitDirectories`.

Note that this does not wrap ``splitPath``, as that function adds trailing slashes to each directory, which is often inconvenient.

split_extension :: DocumentedFunction e #

See `Path.splitExtension`

split_search_path :: LuaError e => DocumentedFunction e #

Wraps function ``splitSearchPath``.

treat_strings_as_paths :: LuaError e => DocumentedFunction e #