func Glob(L *lua.LState) int {
	pattern := L.CheckString(1)
	files, err := filepath.Glob(pattern)
	if err != nil {
		L.Push(lua.LNil)
		return 1
	}
	result := L.CreateTable(len(files), 0)
	for _, file := range files {
		result.Append(lua.LString(file))
	}
	L.Push(result)
	return 1
}
filepath.glob(pattern) returns the names of all files matching pattern or nil if there is no matching file.
package filepath
import (
	"path/filepath"
	lua "github.com/yuin/gopher-lua"
)
func Basename(L *lua.LState) int {
	path := L.CheckString(1)
	L.Push(lua.LString(filepath.Base(path)))
	return 1
}
func Dir(L *lua.LState) int {
	path := L.CheckString(1)
	L.Push(lua.LString(filepath.Dir(path)))
	return 1
}
func Ext(L *lua.LState) int {
	path := L.CheckString(1)
	L.Push(lua.LString(filepath.Ext(path)))
	return 1
}
func Join(L *lua.LState) int {
	path := L.CheckString(1)
	for i := 2; i <= L.GetTop(); i++ {
		add := L.CheckAny(i).String()
		path = filepath.Join(path, add)
	}
	L.Push(lua.LString(path))
	return 1
}
func Separator(L *lua.LState) int {
	L.Push(lua.LString(filepath.Separator))
	return 1
}
func ListSeparator(L *lua.LState) int {
	L.Push(lua.LString(filepath.ListSeparator))
	return 1
}