Skip to content

kumo.fs.symlink_metadata_for_path

kumo.fs.symlink_metadata_for_path(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 behaves exactly like metadata_for_path, except that it does not follow symbolic links and instead returns information about the symbolic link itself.

local kumo = require 'kumo'

local ok, metadata = pcall(kumo.fs.symlink_metadata_for_path, '/tmp/testfile')
if ok then
  print('mtime', metadata.mtime.rfc2822)
else
  print('error', metadata)
end