---@meta posix.glob

---@class posix_glob*
---@field version string
---@field GLOB_ERR integer
---@field GLOB_MARK integer
---@field GLOB_NOCHECK integer
---@field GLOB_ABORTED integer
---@field GLOB_NOMATCH integer
---@field GLOB_NOSPACE integer
---@type posix_glob*
local M = {}

---@param pattern? string
---@param flags? integer
---@return string[]? matches
---@return string? errMsg
---@return integer? errno
function M.glob(pattern, flags) end

return M
