mirror of
https://github.com/rclone/rclone.git
synced 2024-12-12 18:21:57 +01:00
fd51f24906
And in the process - fix a bug with + and & in file name - fix NewObject returning directories as files
56 lines
1.2 KiB
Go
56 lines
1.2 KiB
Go
// +build noencode
|
|
|
|
package encodings
|
|
|
|
import (
|
|
"github.com/rclone/rclone/lib/encoder"
|
|
)
|
|
|
|
// Fake encodings used for testing
|
|
const (
|
|
Base = encoder.MultiEncoder(
|
|
encoder.EncodeZero |
|
|
encoder.EncodeSlash)
|
|
Display = Base
|
|
LocalUnix = Base
|
|
LocalWindows = Base
|
|
AmazonCloudDrive = Base
|
|
AzureBlob = Base
|
|
B2 = Base
|
|
Box = Base
|
|
Drive = Base
|
|
Dropbox = Base
|
|
FTP = Base
|
|
Fichier = Base
|
|
GoogleCloudStorage = Base
|
|
JottaCloud = Base
|
|
Koofr = Base
|
|
Mega = Base
|
|
OneDrive = Base
|
|
OpenDrive = Base
|
|
Pcloud = Base
|
|
PremiumizeMe = Base
|
|
Putio = Base
|
|
QingStor = Base
|
|
S3 = Base
|
|
Sharefile = Base
|
|
Swift = Base
|
|
)
|
|
|
|
// ByName returns the encoder for a give backend name or nil
|
|
func ByName(name string) encoder.Encoder {
|
|
return Base
|
|
}
|
|
|
|
// Local returns the local encoding for the current platform
|
|
func Local() encoder.MultiEncoder {
|
|
return Base
|
|
}
|
|
|
|
// Names returns the list of known encodings as accepted by ByName
|
|
func Names() []string {
|
|
return []string{
|
|
"base",
|
|
}
|
|
}
|