Skip to content

Add function to create file links #5

Open
@sclu1034

Description

@sclu1034

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomersupstreamChanges in a dependency are required

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions