Skip to content

Files

Latest commit

960b9d2 · Sep 20, 2022

History

History
This branch is 10 commits ahead of, 73 commits behind vadv/gopher-lua-libs:master.

filepath

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 13, 2018
May 17, 2019
Dec 13, 2018

filepath GoDoc

Usage

local filepath = require("filepath")

-- filepath.ext()
local result = filepath.ext("/var/tmp/file.name")
if not(result == ".name") then error("ext") end

-- filepath.basename()
local result = filepath.basename("/var/tmp/file.name")
if not(result == "file.name") then error("basename") end

-- filepath.dir()
local result = filepath.dir("/var/tmp/file.name")
if not(result == "/var/tmp") then error("dir") end

-- filepath.join()
local result = filepath.join("/var", "tmp", "file.name")
if not(result == "/var/tmp/file.name") then error("join") end

-- filepath.glob()
local result = filepath.glob("/var/*/*.name")
if not(result[1] == "/var/tmp/file.name") then error("glob") end