1
mirror of https://github.com/rclone/rclone synced 2024-11-14 13:36:24 +01:00
rclone/crypt
Nick Craig-Wood 1fa258c2b4 Define a new Features() method for Fs
Optional interfaces are becoming more important in rclone,
--track-renames and --backup-dir both rely on them.

Up to this point rclone has used interface upgrades to define optional
behaviour on Fs objects.  However when one Fs object wraps another it
is very difficult for this scheme to work accurately.  rclone has
relied on specific error messages being returned when the interface
isn't supported - this is unsatisfactory because it means you have to
call the interface to see whether it is supported.

This change enables accurate detection of optional interfaces by use
of a Features struct as returned by an obligatory Fs.Features()
method.  The Features struct contains flags and function pointers
which can be tested against nil to see whether they can be used.

As a result crypt and hubic can accurately reflect the capabilities of
the underlying Fs they are wrapping.
2017-01-16 17:33:25 +00:00
..
pkcs7 Implement crypt for encrypted remotes - #219 2016-08-23 17:45:37 +01:00
cipher_test.go crypt: return unexpected EOF instead of Failed to authenticate decrypted block #873 2016-12-12 15:20:40 +00:00
cipher.go crypt: return unexpected EOF instead of Failed to authenticate decrypted block #873 2016-12-12 15:20:40 +00:00
crypt2_test.go Add directory parameter to Rmdir and Mkdir #100 #831 2016-11-26 12:02:53 +00:00
crypt_config_test.go Make it possible to test Fs multiple times and use this with crypt 2016-08-23 17:45:37 +01:00
crypt_test.go Add directory parameter to Rmdir and Mkdir #100 #831 2016-11-26 12:02:53 +00:00
crypt.go Define a new Features() method for Fs 2017-01-16 17:33:25 +00:00