$ luarocks install nodejs-path
The module provides utilities for working with file and directory paths. Works similarly to the native NodeJS Path module.
Quickstart:
local path = require('nodejs-path')
local filepath = path.join('somedir', 'somefile.txt')
print('File path: ' .. filepath)
print('Is absolute: ' .. tostring(path.isAbsolute(filepath)))
print('File name: ' .. path.parse(filepath).name)
See full documentation at GitHub https://github.com/shemiakin/lua-nodejs-path
Versions
Dependencies
lua >= 5.1