Skip to content

mah0x211/lua-dirname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lua-dirname

test Coverage Status

extract the directory part of a pathname.

Installation

luarocks install dirname

dir = dirname( pathname )

extract the directory part of a pathname.

Parameters

  • pathname:string: pathname string.

Returns

  • dir:string: the directory part of a pathname.

Example

local dirname = require('dirname')

-- the trailing-slash will be deleted.
local dir = dirname('///usr///bin///')
print(dir) -- '/usr'

About

extract the directory part of a pathname.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages