hslua-module-path-0.0.1: Lua module to work with file paths.
Copyright© 2020 Albert Krewinkel
LicenseMIT
MaintainerAlbert Krewinkel <albert+hslua@zeitkraut.de>
Stabilityalpha
PortabilityRequires GHC 8 or later.
Safe HaskellNone
LanguageHaskell2010

Foreign.Lua.Module.Path

Description

Lua module to work with file paths.

Synopsis

Module

pushModule :: Lua NumResults Source #

Pushes the path module to the Lua stack.

preloadModule :: String -> Lua () Source #

Add the path module under the given name to the table of preloaded packages.

Path manipulations

add_extension :: HaskellFunction Source #

Adds an extension to a file path. Wraps addExtension.

combine :: HaskellFunction Source #

Join two paths with a directory separator. Wraps combine.

directory :: HaskellFunction Source #

See Path.takeDirectory

filename :: HaskellFunction Source #

See Path.takeFilename

is_absolute :: HaskellFunction Source #

See Path.isAbsolute

is_relative :: HaskellFunction Source #

See Path.isRelative

join :: HaskellFunction Source #

See Path.joinPath

normalize :: HaskellFunction Source #

See Path.normalise

split :: HaskellFunction 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 :: HaskellFunction Source #

See Path.splitExtension