Differences
This shows you the differences between the selected revisions of the page.
2016-06-20 | 2016-09-06 | ||
synchronization hint (martin) | library_example_keep_local_directory_up_to_date (martin) | ||
Line 3: | Line 3: | ||
Neither SFTP nor FTP protocol have any mechanism to notify a client about changes in a remote folder. The only solution to detect changes is to periodically enumerate remote directory tree and find differences. It's easy to implement with use of ''[[library_session_enumerateremotefiles|Session.EnumerateRemoteFiles]]'' method and ''[[https://technet.microsoft.com/en-us/library/hh849941.aspx|Compare-Object]]'' cmdlet in PowerShell or ''[[msdn>system.linq.enumerable.except|Enumerable.Except]]'' LINQ method in C#/%%VB.NET%%. | Neither SFTP nor FTP protocol have any mechanism to notify a client about changes in a remote folder. The only solution to detect changes is to periodically enumerate remote directory tree and find differences. It's easy to implement with use of ''[[library_session_enumerateremotefiles|Session.EnumerateRemoteFiles]]'' method and ''[[https://technet.microsoft.com/en-us/library/hh849941.aspx|Compare-Object]]'' cmdlet in PowerShell or ''[[msdn>system.linq.enumerable.except|Enumerable.Except]]'' LINQ method in C#/%%VB.NET%%. | ||
- | //Note that, if you want to download the changes, you do not need to check for changes yourself, just run ''[[library_session_synchronizedirectories|Session.SynchronizeDirectories]]'' in a loop. Even simple [[scripting|script]] with ''[[scriptcommand_synchronize|synchronize local]]'' command will do, see the article [[faq_keep_local_up_to_date|Can I keep local directory up to date?]]// | + | //Note that, if you want to download the changes, you do not need to check for changes yourself, just run ''[[library_session_synchronizedirectories|Session.SynchronizeDirectories]]'' in a loop. You can use the [[library_example_keep_local_directory_up_to_date|Keep local directory up to date]] extension.// |
===== PowerShell ===== | ===== PowerShell ===== |