Session.SynchronizeDirectories() preview missing?

Advertisement

Ciantic
Joined:
Posts:
26
Location:
Finland

Session.SynchronizeDirectories() preview missing?

Hello!

I'm trying to use Session.SynchronizeDirectories but it's missing a preview flag.

How can I do preview using .NET API? I need to first synchronize using `SynchronizationMode.Both` but I need to see the changes first before I let it to proceed to do the real thing, hence I need preview first.

Thanks

Edit: I found this: https://github.com/winscp/winscp/blob/defd6cbbe3e028a2293310f70b8247365c8f2816/dotnet/Session.cs#L908 Maybe just adding a preview bool switch there will do? I can then check the SynchronizationResult and commit the changes manually by iterating the preview result list.

Edit2: I tried in my local fork of WinSCP dotnet DLL but it probably requires a bigger change than just a flag.

Reply with quote

Advertisement

Ciantic
Joined:
Posts:
26
Location:
Finland

Proposal for a API Session.CompareDirectories(...)

I have an simple proposal for the API, new method named: Session.CompareDirectories(...) Since adding to SynchronizeDirectories is not a backwards compatible, so creating a new method is probably good idea.

It's result API could be similar as the SynchronizeResult maybe CompareResult but it would allow to commit each change one by one.

Reply with quote

Advertisement

You can post new topics in this forum