Skip to content

kumo.fs.symlink_metadata_for_path

kumo.fs.symlink_metadata_for_path(PATH)
Since: Version 2026.04.09-ea3b2a9b

The functionality described in this section requires version 2026.04.09-ea3b2a9b of KumoMTA, or a more recent version.

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