Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to create file links #5

Open
sclu1034 opened this issue Mar 15, 2022 · 0 comments
Open

Add function to create file links #5

sclu1034 opened this issue Mar 15, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers upstream Changes in a dependency are required

Comments

@sclu1034
Copy link
Owner

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
@sclu1034 sclu1034 added enhancement New feature or request good first issue Good for newcomers upstream Changes in a dependency are required labels Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers upstream Changes in a dependency are required
Projects
None yet
Development

No branches or pull requests

1 participant