Copyright | © 2020 Albert Krewinkel |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <albert+hslua@zeitkraut.de> |
Stability | alpha |
Portability | Requires GHC 8 or later. |
Safe Haskell | None |
Language | Haskell2010 |
Lua module to work with file paths.
Synopsis
- pushModule :: Lua NumResults
- preloadModule :: String -> Lua ()
- documentedModule :: Module
- add_extension :: HaskellFunction
- combine :: HaskellFunction
- directory :: HaskellFunction
- filename :: HaskellFunction
- is_absolute :: HaskellFunction
- is_relative :: HaskellFunction
- join :: HaskellFunction
- make_relative :: HaskellFunction
- normalize :: HaskellFunction
- split :: HaskellFunction
- split_extension :: HaskellFunction
- split_search_path :: HaskellFunction
- treat_strings_as_paths :: HaskellFunction
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
, as that function
adds trailing slashes to each directory, which is often inconvenient.splitPath
split_extension :: HaskellFunction Source #
See Path.splitExtension
split_search_path :: HaskellFunction Source #
Wraps function
.splitSearchPath