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 SMB support [discussion] #7

Open
Dudeplayz opened this issue Jul 27, 2022 · 5 comments
Open

Add SMB support [discussion] #7

Dudeplayz opened this issue Jul 27, 2022 · 5 comments

Comments

@Dudeplayz
Copy link

Hi, thanks for the nice addon. I have written a TreeData and DataProvider to support the browsing and handling of SMB sources. Lazy loading is supported. My implementation is based on https://github.com/hierynomus/smbj. I would like to know if there is interest to merge it into this project. Some polishment would be needed if it is desired.

@TatuLund
Copy link
Owner

TatuLund commented Aug 5, 2022

Yes, that sounds interesting. So if you can contribute it, open PR and I will review it. Just check how the current FTP and File support has been done to follow the pattern.

@Dudeplayz
Copy link
Author

Hi @TatuLund,
I started the implementation of the SMB version. The question I have is if the responsibility for correctly closing the connection should be on the user or if it all should be handled. If the file tree should be loaded recursive at initialization it would be no problem to close the connection after it. But if it is used lazy, then must either stay open or be reopened at every access. The first case would require a correct user shutdown, while the second requires knowing how the passwords etc. are to reopen it (or a wrapper class, which captures that). When I am correct, the FtpClient relies on the responisbility of the user? This would also be the simplest implementation for the SmbClient.
What do you think?

@TatuLund
Copy link
Owner

TatuLund commented Oct 3, 2022

When I am correct, the FtpClient relies on the responisbility of the user? This would also be the simplest implementation for the SmbClient.

Yes, I would assume so. Reminds me, that have I remembered to write note on this in JavaDoc though.

@Dudeplayz
Copy link
Author

Ok, so I will go with the user responsibility version.

Is there a reason for the multiple Selects etc. for every filesystem type? Maybe a refactoring to unify it would be good?

@TatuLund
Copy link
Owner

TatuLund commented Dec 5, 2022

Is there a reason for the multiple Selects etc. for every filesystem type?

Just organic growth.

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

No branches or pull requests

2 participants