Skip to content

kumo.read_dir(path)

Since: Dev Builds Only

The functionality described in this section requires a dev build of KumoMTA. You can obtain a dev build by following the instructions in the Installation section.

This function returns an array containing the absolute file names of the directory specified. Due to limitations in the lua bindings, all of the paths must be able to be represented as UTF-8 or this function will generate an error.

local kumo = require 'kumo'

-- logs the names of all of the entries under `/etc`
print(kumo.json_encode_pretty(kumo.read_dir '/etc'))