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

Enable getting and deleting symbolic links #1161

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

fbedoyao
Copy link

@fbedoyao fbedoyao commented Aug 24, 2023

The current functions in the SftpClient class don’t support interacting with symbolic links directly. By adding an additional parameter, getRealPath, to the GetCanonicalPath function, we can get a reference to the symbolic link instead of a reference to the file that it points to. The default value for this parameter is set to true so that the original behavior is maintained for existing code.

The added functions GetSymbolicLink, SymbolicLinkExists, and DeleteSymbolicLink use GetCanonicalPath with getRealPath set to false to get and delete symbolic links.

@fbedoyao fbedoyao requested a review from drieseng as a code owner August 24, 2023 19:27
@fbedoyao fbedoyao force-pushed the enable-get-delete-symlink branch from 241fe98 to 8c7202c Compare August 25, 2023 21:08
@fbedoyao fbedoyao force-pushed the enable-get-delete-symlink branch from 093813a to 8c7202c Compare August 25, 2023 23:06
@WojciechNagorski
Copy link
Collaborator

@fbedoyao It looks great. Can you add an integration test for those methods?
Here you can find an example:

public async Task Create_directory_with_contents_and_list_it_async()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants