Arlodotexe / OwlCore.Storage

The most flexible file system abstraction, ever. Built in partnership with the UWP Community.
16 stars 4 forks source link

New implementation for SSH, SCP and SFTP #55

Open Arlodotexe opened 5 months ago

Arlodotexe commented 5 months ago

Originally posted by @itsWindows11 in https://github.com/Arlodotexe/OwlCore.Storage/issues/12#issuecomment-2160050385

FTP and SFTP should be completely different implementations, as SFTP isn't the same as FTPS.

SSH.NET is basically the only actively maintained free SFTP/SCP library that I could find. Problem is it has some methods that are sync only, and others that are async but use the old Begin/End pattern, or async with callbacks, and finally async using Task, and it doesn't support checking the creation date of a file.

Instead of potentially exhausting the threadpool for IO if one were to stress test the SFTP implementation using that library, we might need a fork that properly makes use of Task and async, and maybe contribute back to the original repo.

We might need to look into adding progress reporting too in the abstraction if it already isn't there, Files might need it.

Arlodotexe commented 5 months ago

Tracking progress reporting in https://github.com/Arlodotexe/OwlCore.Storage/issues/54

Arlodotexe commented 5 months ago

Linking https://github.com/sshnet/SSH.NET/issues/1415

snargledorf commented 2 months ago

I've recently started adding async implementations for some of the SFTP functions in the SSH.NET library. Just wanted to mention since I didn't see anyone else working on this.

I'm using the issue @Arlodotexe linked for tracking my PR's.

itsWindows11 commented 1 month ago

@Arlodotexe

snargledorf commented 1 month ago

So far added:

There is also a PR being worked on to add official support for DownloadFileAsync, UploadFileAsync and SynchronizeDirectoriesAsync.

Not sure if anyone else is working on any other async support, but these cover most of the basics IMO.

Not sure when a build of the library will occur that will include these changes.