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 Source #

The `path` module specification.

# Fields

separator :: Field e Source #

Wrapper for ``pathSeparator``.

search_path_separator :: Field e Source #

Wrapper for ``searchPathSeparator``.

# Path manipulation

add_extension :: DocumentedFunction e Source #

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

combine :: DocumentedFunction e Source #

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

directory :: DocumentedFunction e Source #

See `Path.takeDirectory`

filename :: DocumentedFunction e Source #

See `Path.takeFilename`

is_absolute :: DocumentedFunction e Source #

See `Path.isAbsolute`

is_relative :: DocumentedFunction e Source #

See `Path.isRelative`

join :: LuaError e => DocumentedFunction e Source #

See `Path.joinPath`

make_relative :: DocumentedFunction e Source #

normalize :: DocumentedFunction e Source #

See `Path.normalise`

split :: LuaError e => DocumentedFunction e Source #

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 Source #

See `Path.splitExtension`

split_search_path :: LuaError e => DocumentedFunction e Source #

Wraps function ``splitSearchPath``.

treat_strings_as_paths :: LuaError e => DocumentedFunction e Source #