-
Notifications
You must be signed in to change notification settings - Fork 63
How FTPSync's syncing works
When FTPSync is tasked to up/download a certain file, it looks whether the file should not be ignored. Then it will try to look in current and all parent folders in a path whether they contain ftpsync.settings file until the nearest is found (or ends up with none).
Example:
Uploading /foo/bar/test.json
...exists? /foo/bar/ftpsync.settings
...exists? /foo/ftpsync.settings
...exists? /ftpsync.settings
If none is found, then the task ends with no upload performed.
Otherwise it takes the contents of the nearest one and merges each connection entry with project_defaults part in https://github.com/NoxArt/SublimeText2-FTPSync/blob/master/ftpsync.sublime-settings for default values.
Unless the file should be ignored by connection's settings, FTPSync then performs upload using ftplib.storbinary (for FTP(S) uploads) and prints a message.
Pairs filename => config_file_path are cached, contents of the config file are currently not to not force you to restart Sublime on each config change.