Open
Description
This will require adding the relevant functions to GLib first:
g_file_make_symbolic_link_async
g_file_make_symbolic_link_finish
g_file_make_hard_link_async
g_file_make_hard_link_finish
The synchronous g_file_make_symbolic_link
already exists, but GLib does not yet support creating hard links at all.
The Lua wrapper should be rather straight forward. The signature should be
-- @async
-- @tparam string target The target to point the link to.
-- @tparam[opt=true] boolean symbolic If `true`, create a symbolic link.
-- @treturn[opt] GLib.Error
function File:link(target, symbolic, cb)
end