Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

Move all backends into backend directory

Nick Craig-Woodb8b620f5c2df
diff --git a/backend/all/all.go b/backend/all/all.go
new file mode 100644
index 000000000..8a901be24
--- /dev/null
+++ b/backend/all/all.go
@@ -0,0 +1,26 @@
+package all
+
+import (
+ // Active file systems
+ _ "github.com/ncw/rclone/backend/amazonclouddrive"
+ _ "github.com/ncw/rclone/backend/azureblob"
+ _ "github.com/ncw/rclone/backend/b2"
+ _ "github.com/ncw/rclone/backend/box"
+ _ "github.com/ncw/rclone/backend/cache"
+ _ "github.com/ncw/rclone/backend/crypt"
+ _ "github.com/ncw/rclone/backend/drive"
+ _ "github.com/ncw/rclone/backend/dropbox"
+ _ "github.com/ncw/rclone/backend/ftp"
+ _ "github.com/ncw/rclone/backend/googlecloudstorage"
+ _ "github.com/ncw/rclone/backend/http"
+ _ "github.com/ncw/rclone/backend/hubic"
+ _ "github.com/ncw/rclone/backend/local"
+ _ "github.com/ncw/rclone/backend/onedrive"
+ _ "github.com/ncw/rclone/backend/pcloud"
+ _ "github.com/ncw/rclone/backend/qingstor"
+ _ "github.com/ncw/rclone/backend/s3"
+ _ "github.com/ncw/rclone/backend/sftp"
+ _ "github.com/ncw/rclone/backend/swift"
+ _ "github.com/ncw/rclone/backend/webdav"
+ _ "github.com/ncw/rclone/backend/yandex"
+)
diff --git a/amazonclouddrive/amazonclouddrive.go b/backend/amazonclouddrive/amazonclouddrive.go
similarity index 100%
rename from amazonclouddrive/amazonclouddrive.go
rename to backend/amazonclouddrive/amazonclouddrive.go
diff --git a/amazonclouddrive/amazonclouddrive_test.go b/backend/amazonclouddrive/amazonclouddrive_test.go
similarity index 98%
rename from amazonclouddrive/amazonclouddrive_test.go
rename to backend/amazonclouddrive/amazonclouddrive_test.go
index b2283ba57..2418119f6 100644
--- a/amazonclouddrive/amazonclouddrive_test.go
+++ b/backend/amazonclouddrive/amazonclouddrive_test.go
@@ -7,7 +7,7 @@ package amazonclouddrive_test
import (
"testing"
- "github.com/ncw/rclone/amazonclouddrive"
+ "github.com/ncw/rclone/backend/amazonclouddrive"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
)
diff --git a/azureblob/azureblob.go b/backend/azureblob/azureblob.go
similarity index 100%
rename from azureblob/azureblob.go
rename to backend/azureblob/azureblob.go
diff --git a/azureblob/azureblob_test.go b/backend/azureblob/azureblob_test.go
similarity index 99%
rename from azureblob/azureblob_test.go
rename to backend/azureblob/azureblob_test.go
index 822c44d6f..48f9c11aa 100644
--- a/azureblob/azureblob_test.go
+++ b/backend/azureblob/azureblob_test.go
@@ -10,7 +10,7 @@ package azureblob_test
import (
"testing"
- "github.com/ncw/rclone/azureblob"
+ "github.com/ncw/rclone/backend/azureblob"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
)
diff --git a/azureblob/azureblob_unsupported.go b/backend/azureblob/azureblob_unsupported.go
similarity index 100%
rename from azureblob/azureblob_unsupported.go
rename to backend/azureblob/azureblob_unsupported.go
diff --git a/b2/api/types.go b/backend/b2/api/types.go
similarity index 100%
rename from b2/api/types.go
rename to backend/b2/api/types.go
diff --git a/b2/api/types_test.go b/backend/b2/api/types_test.go
similarity index 98%
rename from b2/api/types_test.go
rename to backend/b2/api/types_test.go
index dd1c23208..6131a2b41 100644
--- a/b2/api/types_test.go
+++ b/backend/b2/api/types_test.go
@@ -4,7 +4,7 @@ import (
"testing"
"time"
- "github.com/ncw/rclone/b2/api"
+ "github.com/ncw/rclone/backend/b2/api"
"github.com/ncw/rclone/fstest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
diff --git a/b2/b2.go b/backend/b2/b2.go
similarity index 99%
rename from b2/b2.go
rename to backend/b2/b2.go
index 80504ab2b..926e17a42 100644
--- a/b2/b2.go
+++ b/backend/b2/b2.go
@@ -19,7 +19,7 @@ import (
"sync"
"time"
- "github.com/ncw/rclone/b2/api"
+ "github.com/ncw/rclone/backend/b2/api"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/pacer"
"github.com/ncw/rclone/rest"
diff --git a/b2/b2_internal_test.go b/backend/b2/b2_internal_test.go
similarity index 100%
rename from b2/b2_internal_test.go
rename to backend/b2/b2_internal_test.go
diff --git a/b2/b2_test.go b/backend/b2/b2_test.go
similarity index 99%
rename from b2/b2_test.go
rename to backend/b2/b2_test.go
index 6004cbcac..124559c61 100644
--- a/b2/b2_test.go
+++ b/backend/b2/b2_test.go
@@ -7,7 +7,7 @@ package b2_test
import (
"testing"
- "github.com/ncw/rclone/b2"
+ "github.com/ncw/rclone/backend/b2"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
)
diff --git a/b2/upload.go b/backend/b2/upload.go
similarity index 99%
rename from b2/upload.go
rename to backend/b2/upload.go
index 18c17e3c9..3519de727 100644
--- a/b2/upload.go
+++ b/backend/b2/upload.go
@@ -14,7 +14,7 @@ import (
"strings"
"sync"
- "github.com/ncw/rclone/b2/api"
+ "github.com/ncw/rclone/backend/b2/api"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/rest"
"github.com/pkg/errors"
diff --git a/box/api/types.go b/backend/box/api/types.go
similarity index 100%
rename from box/api/types.go
rename to backend/box/api/types.go
diff --git a/box/box.go b/backend/box/box.go
similarity index 99%
rename from box/box.go
rename to backend/box/box.go
index ea93dbb00..7673a45ae 100644
--- a/box/box.go
+++ b/backend/box/box.go
@@ -21,7 +21,7 @@ import (
"strings"
"time"
- "github.com/ncw/rclone/box/api"
+ "github.com/ncw/rclone/backend/box/api"
"github.com/ncw/rclone/dircache"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/oauthutil"
diff --git a/box/box_test.go b/backend/box/box_test.go
similarity index 99%
rename from box/box_test.go
rename to backend/box/box_test.go
index df6841b4c..dc3bfd549 100644
--- a/box/box_test.go
+++ b/backend/box/box_test.go
@@ -7,7 +7,7 @@ package box_test
import (
"testing"
- "github.com/ncw/rclone/box"
+ "github.com/ncw/rclone/backend/box"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
)
diff --git a/box/upload.go b/backend/box/upload.go
similarity index 99%
rename from box/upload.go
rename to backend/box/upload.go
index 81f65564f..66d8454d7 100644
--- a/box/upload.go
+++ b/backend/box/upload.go
@@ -14,7 +14,7 @@ import (
"sync"
"time"
- "github.com/ncw/rclone/box/api"
+ "github.com/ncw/rclone/backend/box/api"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/rest"
"github.com/pkg/errors"
diff --git a/cache/cache.go b/backend/cache/cache.go
similarity index 99%
rename from cache/cache.go
rename to backend/cache/cache.go
index 9f55cfd0f..a2a680440 100644
--- a/cache/cache.go
+++ b/backend/cache/cache.go
@@ -16,7 +16,7 @@ import (
"os/signal"
"syscall"
- "github.com/ncw/rclone/crypt"
+ "github.com/ncw/rclone/backend/crypt"
"github.com/ncw/rclone/fs"
"github.com/pkg/errors"
"golang.org/x/net/context"
diff --git a/cache/cache_internal_test.go b/backend/cache/cache_internal_test.go
similarity index 99%
rename from cache/cache_internal_test.go
rename to backend/cache/cache_internal_test.go
index 1b0c1483e..9ad29587f 100644
--- a/cache/cache_internal_test.go
+++ b/backend/cache/cache_internal_test.go
@@ -19,14 +19,14 @@ import (
"os/exec"
//"strings"
- "github.com/ncw/rclone/cache"
+ "github.com/ncw/rclone/backend/cache"
//"github.com/ncw/rclone/cmd/mount"
//_ "github.com/ncw/rclone/cmd/cmount"
//"github.com/ncw/rclone/cmd/mountlib"
- _ "github.com/ncw/rclone/drive"
+ _ "github.com/ncw/rclone/backend/drive"
+ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest"
- "github.com/ncw/rclone/local"
flag "github.com/spf13/pflag"
"github.com/stretchr/testify/require"
)
diff --git a/cache/cache_test.go b/backend/cache/cache_test.go
similarity index 98%
rename from cache/cache_test.go
rename to backend/cache/cache_test.go
index 5ea6be7e3..7da438fc0 100644
--- a/cache/cache_test.go
+++ b/backend/cache/cache_test.go
@@ -10,10 +10,10 @@ package cache_test
import (
"testing"
- "github.com/ncw/rclone/cache"
+ "github.com/ncw/rclone/backend/cache"
+ _ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- _ "github.com/ncw/rclone/local"
)
func TestSetup(t *testing.T) {
diff --git a/cache/cache_unsupported.go b/backend/cache/cache_unsupported.go
similarity index 100%
rename from cache/cache_unsupported.go
rename to backend/cache/cache_unsupported.go
diff --git a/cache/directory.go b/backend/cache/directory.go
similarity index 100%
rename from cache/directory.go
rename to backend/cache/directory.go
diff --git a/cache/handle.go b/backend/cache/handle.go
similarity index 100%
rename from cache/handle.go
rename to backend/cache/handle.go
diff --git a/cache/object.go b/backend/cache/object.go
similarity index 100%
rename from cache/object.go
rename to backend/cache/object.go
diff --git a/cache/plex.go b/backend/cache/plex.go
similarity index 100%
rename from cache/plex.go
rename to backend/cache/plex.go
diff --git a/cache/storage_memory.go b/backend/cache/storage_memory.go
similarity index 100%
rename from cache/storage_memory.go
rename to backend/cache/storage_memory.go
diff --git a/cache/storage_persistent.go b/backend/cache/storage_persistent.go
similarity index 100%
rename from cache/storage_persistent.go
rename to backend/cache/storage_persistent.go
diff --git a/crypt/cipher.go b/backend/crypt/cipher.go
similarity index 99%
rename from crypt/cipher.go
rename to backend/crypt/cipher.go
index 947686509..5394ef0b2 100644
--- a/crypt/cipher.go
+++ b/backend/crypt/cipher.go
@@ -13,7 +13,7 @@ import (
"sync"
"unicode/utf8"
- "github.com/ncw/rclone/crypt/pkcs7"
+ "github.com/ncw/rclone/backend/crypt/pkcs7"
"github.com/pkg/errors"
"golang.org/x/crypto/nacl/secretbox"
diff --git a/crypt/cipher_test.go b/backend/crypt/cipher_test.go
similarity index 99%
rename from crypt/cipher_test.go
rename to backend/crypt/cipher_test.go
index e69ca460e..66b6c699a 100644
--- a/crypt/cipher_test.go
+++ b/backend/crypt/cipher_test.go
@@ -9,7 +9,7 @@ import (
"strings"
"testing"
- "github.com/ncw/rclone/crypt/pkcs7"
+ "github.com/ncw/rclone/backend/crypt/pkcs7"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
diff --git a/crypt/crypt.go b/backend/crypt/crypt.go
similarity index 100%
rename from crypt/crypt.go
rename to backend/crypt/crypt.go
diff --git a/crypt/crypt2_test.go b/backend/crypt/crypt2_test.go
similarity index 98%
rename from crypt/crypt2_test.go
rename to backend/crypt/crypt2_test.go
index 2631ce95f..5b83fae52 100644
--- a/crypt/crypt2_test.go
+++ b/backend/crypt/crypt2_test.go
@@ -7,10 +7,10 @@ package crypt_test
import (
"testing"
- "github.com/ncw/rclone/crypt"
+ "github.com/ncw/rclone/backend/crypt"
+ _ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- _ "github.com/ncw/rclone/local"
)
func TestSetup2(t *testing.T) {
diff --git a/crypt/crypt3_test.go b/backend/crypt/crypt3_test.go
similarity index 98%
rename from crypt/crypt3_test.go
rename to backend/crypt/crypt3_test.go
index 41f6b63ca..db253515f 100644
--- a/crypt/crypt3_test.go
+++ b/backend/crypt/crypt3_test.go
@@ -7,10 +7,10 @@ package crypt_test
import (
"testing"
- "github.com/ncw/rclone/crypt"
+ "github.com/ncw/rclone/backend/crypt"
+ _ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- _ "github.com/ncw/rclone/local"
)
func TestSetup3(t *testing.T) {
diff --git a/crypt/crypt_config_test.go b/backend/crypt/crypt_config_test.go
similarity index 100%
rename from crypt/crypt_config_test.go
rename to backend/crypt/crypt_config_test.go
diff --git a/crypt/crypt_test.go b/backend/crypt/crypt_test.go
similarity index 98%
rename from crypt/crypt_test.go
rename to backend/crypt/crypt_test.go
index 7e4f9a0df..1f51b1556 100644
--- a/crypt/crypt_test.go
+++ b/backend/crypt/crypt_test.go
@@ -7,10 +7,10 @@ package crypt_test
import (
"testing"
- "github.com/ncw/rclone/crypt"
+ "github.com/ncw/rclone/backend/crypt"
+ _ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- _ "github.com/ncw/rclone/local"
)
func TestSetup(t *testing.T) {
diff --git a/crypt/pkcs7/pkcs7.go b/backend/crypt/pkcs7/pkcs7.go
similarity index 100%
rename from crypt/pkcs7/pkcs7.go
rename to backend/crypt/pkcs7/pkcs7.go
diff --git a/crypt/pkcs7/pkcs7_test.go b/backend/crypt/pkcs7/pkcs7_test.go
similarity index 100%
rename from crypt/pkcs7/pkcs7_test.go
rename to backend/crypt/pkcs7/pkcs7_test.go
diff --git a/drive/drive.go b/backend/drive/drive.go
similarity index 100%
rename from drive/drive.go
rename to backend/drive/drive.go
diff --git a/drive/drive_internal_test.go b/backend/drive/drive_internal_test.go
similarity index 100%
rename from drive/drive_internal_test.go
rename to backend/drive/drive_internal_test.go
diff --git a/drive/drive_test.go b/backend/drive/drive_test.go
similarity index 99%
rename from drive/drive_test.go
rename to backend/drive/drive_test.go
index 58ce7bdce..51ff87d60 100644
--- a/drive/drive_test.go
+++ b/backend/drive/drive_test.go
@@ -7,7 +7,7 @@ package drive_test
import (
"testing"
- "github.com/ncw/rclone/drive"
+ "github.com/ncw/rclone/backend/drive"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
)
diff --git a/drive/upload.go b/backend/drive/upload.go
similarity index 100%
rename from drive/upload.go
rename to backend/drive/upload.go
diff --git a/dropbox/dbhash/dbhash.go b/backend/dropbox/dbhash/dbhash.go
similarity index 100%
rename from dropbox/dbhash/dbhash.go
rename to backend/dropbox/dbhash/dbhash.go
diff --git a/dropbox/dbhash/dbhash_test.go b/backend/dropbox/dbhash/dbhash_test.go
similarity index 98%
rename from dropbox/dbhash/dbhash_test.go
rename to backend/dropbox/dbhash/dbhash_test.go
index f219d0961..9bac957bf 100644
--- a/dropbox/dbhash/dbhash_test.go
+++ b/backend/dropbox/dbhash/dbhash_test.go
@@ -5,7 +5,7 @@ import (
"fmt"
"testing"
- "github.com/ncw/rclone/dropbox/dbhash"
+ "github.com/ncw/rclone/backend/dropbox/dbhash"
"github.com/stretchr/testify/assert"
)
diff --git a/dropbox/dropbox.go b/backend/dropbox/dropbox.go
similarity index 100%
rename from dropbox/dropbox.go
rename to backend/dropbox/dropbox.go
diff --git a/dropbox/dropbox_test.go b/backend/dropbox/dropbox_test.go
similarity index 99%
rename from dropbox/dropbox_test.go
rename to backend/dropbox/dropbox_test.go
index c3f25af1e..97da731cb 100644
--- a/dropbox/dropbox_test.go
+++ b/backend/dropbox/dropbox_test.go
@@ -7,7 +7,7 @@ package dropbox_test
import (
"testing"
- "github.com/ncw/rclone/dropbox"
+ "github.com/ncw/rclone/backend/dropbox"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
)
diff --git a/ftp/ftp.go b/backend/ftp/ftp.go
similarity index 100%
rename from ftp/ftp.go
rename to backend/ftp/ftp.go
diff --git a/ftp/ftp_test.go b/backend/ftp/ftp_test.go
similarity index 99%
rename from ftp/ftp_test.go
rename to backend/ftp/ftp_test.go
index be0aef4de..73124f6f1 100644
--- a/ftp/ftp_test.go
+++ b/backend/ftp/ftp_test.go
@@ -7,9 +7,9 @@ package ftp_test
import (
"testing"
+ "github.com/ncw/rclone/backend/ftp"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/ftp"
)
func TestSetup(t *testing.T) {
diff --git a/googlecloudstorage/googlecloudstorage.go b/backend/googlecloudstorage/googlecloudstorage.go
similarity index 100%
rename from googlecloudstorage/googlecloudstorage.go
rename to backend/googlecloudstorage/googlecloudstorage.go
diff --git a/googlecloudstorage/googlecloudstorage_test.go b/backend/googlecloudstorage/googlecloudstorage_test.go
similarity index 98%
rename from googlecloudstorage/googlecloudstorage_test.go
rename to backend/googlecloudstorage/googlecloudstorage_test.go
index 1bad354d2..9b8cd9580 100644
--- a/googlecloudstorage/googlecloudstorage_test.go
+++ b/backend/googlecloudstorage/googlecloudstorage_test.go
@@ -7,9 +7,9 @@ package googlecloudstorage_test
import (
"testing"
+ "github.com/ncw/rclone/backend/googlecloudstorage"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/googlecloudstorage"
)
func TestSetup(t *testing.T) {
diff --git a/http/http.go b/backend/http/http.go
similarity index 100%
rename from http/http.go
rename to backend/http/http.go
diff --git a/http/http_internal_test.go b/backend/http/http_internal_test.go
similarity index 100%
rename from http/http_internal_test.go
rename to backend/http/http_internal_test.go
diff --git a/http/http_unsupported.go b/backend/http/http_unsupported.go
similarity index 100%
rename from http/http_unsupported.go
rename to backend/http/http_unsupported.go
diff --git a/http/test/files/four/under four.txt b/backend/http/test/files/four/under four.txt
similarity index 100%
rename from http/test/files/four/under four.txt
rename to backend/http/test/files/four/under four.txt
diff --git a/http/test/files/one%.txt b/backend/http/test/files/one%.txt
similarity index 100%
rename from http/test/files/one%.txt
rename to backend/http/test/files/one%.txt
diff --git a/http/test/files/three/underthree.txt b/backend/http/test/files/three/underthree.txt
similarity index 100%
rename from http/test/files/three/underthree.txt
rename to backend/http/test/files/three/underthree.txt
diff --git a/http/test/files/two.html b/backend/http/test/files/two.html
similarity index 100%
rename from http/test/files/two.html
rename to backend/http/test/files/two.html
diff --git a/http/test/index_files/apache.html b/backend/http/test/index_files/apache.html
similarity index 100%
rename from http/test/index_files/apache.html
rename to backend/http/test/index_files/apache.html
diff --git a/http/test/index_files/caddy.html b/backend/http/test/index_files/caddy.html
similarity index 100%
rename from http/test/index_files/caddy.html
rename to backend/http/test/index_files/caddy.html
diff --git a/http/test/index_files/empty.html b/backend/http/test/index_files/empty.html
similarity index 100%
rename from http/test/index_files/empty.html
rename to backend/http/test/index_files/empty.html
diff --git a/http/test/index_files/memstore.html b/backend/http/test/index_files/memstore.html
similarity index 100%
rename from http/test/index_files/memstore.html
rename to backend/http/test/index_files/memstore.html
diff --git a/http/test/index_files/nginx.html b/backend/http/test/index_files/nginx.html
similarity index 100%
rename from http/test/index_files/nginx.html
rename to backend/http/test/index_files/nginx.html
diff --git a/hubic/auth.go b/backend/hubic/auth.go
similarity index 100%
rename from hubic/auth.go
rename to backend/hubic/auth.go
diff --git a/hubic/hubic.go b/backend/hubic/hubic.go
similarity index 99%
rename from hubic/hubic.go
rename to backend/hubic/hubic.go
index dd3f4f99a..4a45fca65 100644
--- a/hubic/hubic.go
+++ b/backend/hubic/hubic.go
@@ -13,9 +13,9 @@ import (
"net/http"
"time"
+ "github.com/ncw/rclone/backend/swift"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/oauthutil"
- "github.com/ncw/rclone/swift"
swiftLib "github.com/ncw/swift"
"github.com/pkg/errors"
"golang.org/x/oauth2"
diff --git a/hubic/hubic_test.go b/backend/hubic/hubic_test.go
similarity index 99%
rename from hubic/hubic_test.go
rename to backend/hubic/hubic_test.go
index 94ac3bacf..719e48733 100644
--- a/hubic/hubic_test.go
+++ b/backend/hubic/hubic_test.go
@@ -7,9 +7,9 @@ package hubic_test
import (
"testing"
+ "github.com/ncw/rclone/backend/hubic"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/hubic"
)
func TestSetup(t *testing.T) {
diff --git a/local/local.go b/backend/local/local.go
similarity index 100%
rename from local/local.go
rename to backend/local/local.go
diff --git a/local/local_internal_test.go b/backend/local/local_internal_test.go
similarity index 100%
rename from local/local_internal_test.go
rename to backend/local/local_internal_test.go
diff --git a/local/local_test.go b/backend/local/local_test.go
similarity index 99%
rename from local/local_test.go
rename to backend/local/local_test.go
index 242be8fe6..204ccec01 100644
--- a/local/local_test.go
+++ b/backend/local/local_test.go
@@ -7,9 +7,9 @@ package local_test
import (
"testing"
+ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/local"
)
func TestSetup(t *testing.T) {
diff --git a/local/read_device_other.go b/backend/local/read_device_other.go
similarity index 100%
rename from local/read_device_other.go
rename to backend/local/read_device_other.go
diff --git a/local/read_device_unix.go b/backend/local/read_device_unix.go
similarity index 100%
rename from local/read_device_unix.go
rename to backend/local/read_device_unix.go
diff --git a/local/tests_test.go b/backend/local/tests_test.go
similarity index 100%
rename from local/tests_test.go
rename to backend/local/tests_test.go
diff --git a/onedrive/api/types.go b/backend/onedrive/api/types.go
similarity index 100%
rename from onedrive/api/types.go
rename to backend/onedrive/api/types.go
diff --git a/onedrive/onedrive.go b/backend/onedrive/onedrive.go
similarity index 99%
rename from onedrive/onedrive.go
rename to backend/onedrive/onedrive.go
index 310d547db..9f21fa163 100644
--- a/onedrive/onedrive.go
+++ b/backend/onedrive/onedrive.go
@@ -14,10 +14,10 @@ import (
"strings"
"time"
+ "github.com/ncw/rclone/backend/onedrive/api"
"github.com/ncw/rclone/dircache"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/oauthutil"
- "github.com/ncw/rclone/onedrive/api"
"github.com/ncw/rclone/pacer"
"github.com/ncw/rclone/rest"
"github.com/pkg/errors"
diff --git a/onedrive/onedrive_test.go b/backend/onedrive/onedrive_test.go
similarity index 99%
rename from onedrive/onedrive_test.go
rename to backend/onedrive/onedrive_test.go
index bab890aaf..67ea534e5 100644
--- a/onedrive/onedrive_test.go
+++ b/backend/onedrive/onedrive_test.go
@@ -7,9 +7,9 @@ package onedrive_test
import (
"testing"
+ "github.com/ncw/rclone/backend/onedrive"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/onedrive"
)
func TestSetup(t *testing.T) {
diff --git a/onedrive/replace.go b/backend/onedrive/replace.go
similarity index 100%
rename from onedrive/replace.go
rename to backend/onedrive/replace.go
diff --git a/onedrive/replace_test.go b/backend/onedrive/replace_test.go
similarity index 100%
rename from onedrive/replace_test.go
rename to backend/onedrive/replace_test.go
diff --git a/pcloud/api/types.go b/backend/pcloud/api/types.go
similarity index 100%
rename from pcloud/api/types.go
rename to backend/pcloud/api/types.go
diff --git a/pcloud/pcloud.go b/backend/pcloud/pcloud.go
similarity index 99%
rename from pcloud/pcloud.go
rename to backend/pcloud/pcloud.go
index 75f6e68d8..c0c1dd8c4 100644
--- a/pcloud/pcloud.go
+++ b/backend/pcloud/pcloud.go
@@ -21,11 +21,11 @@ import (
"strings"
"time"
+ "github.com/ncw/rclone/backend/pcloud/api"
"github.com/ncw/rclone/dircache"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/oauthutil"
"github.com/ncw/rclone/pacer"
- "github.com/ncw/rclone/pcloud/api"
"github.com/ncw/rclone/rest"
"github.com/pkg/errors"
"golang.org/x/oauth2"
diff --git a/pcloud/pcloud_test.go b/backend/pcloud/pcloud_test.go
similarity index 99%
rename from pcloud/pcloud_test.go
rename to backend/pcloud/pcloud_test.go
index d9fe37564..b0a4b9a89 100644
--- a/pcloud/pcloud_test.go
+++ b/backend/pcloud/pcloud_test.go
@@ -7,9 +7,9 @@ package pcloud_test
import (
"testing"
+ "github.com/ncw/rclone/backend/pcloud"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/pcloud"
)
func TestSetup(t *testing.T) {
diff --git a/qingstor/qingstor.go b/backend/qingstor/qingstor.go
similarity index 100%
rename from qingstor/qingstor.go
rename to backend/qingstor/qingstor.go
diff --git a/qingstor/qingstor_test.go b/backend/qingstor/qingstor_test.go
similarity index 99%
rename from qingstor/qingstor_test.go
rename to backend/qingstor/qingstor_test.go
index 5a4bb1dab..f3279bbb8 100644
--- a/qingstor/qingstor_test.go
+++ b/backend/qingstor/qingstor_test.go
@@ -10,9 +10,9 @@ package qingstor_test
import (
"testing"
+ "github.com/ncw/rclone/backend/qingstor"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/qingstor"
)
func TestSetup(t *testing.T) {
diff --git a/qingstor/qingstor_unsupported.go b/backend/qingstor/qingstor_unsupported.go
similarity index 100%
rename from qingstor/qingstor_unsupported.go
rename to backend/qingstor/qingstor_unsupported.go
diff --git a/qingstor/upload.go b/backend/qingstor/upload.go
similarity index 100%
rename from qingstor/upload.go
rename to backend/qingstor/upload.go
diff --git a/s3/s3.go b/backend/s3/s3.go
similarity index 100%
rename from s3/s3.go
rename to backend/s3/s3.go
diff --git a/s3/s3_test.go b/backend/s3/s3_test.go
similarity index 99%
rename from s3/s3_test.go
rename to backend/s3/s3_test.go
index c0f7f56c1..3328206f4 100644
--- a/s3/s3_test.go
+++ b/backend/s3/s3_test.go
@@ -7,9 +7,9 @@ package s3_test
import (
"testing"
+ "github.com/ncw/rclone/backend/s3"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/s3"
)
func TestSetup(t *testing.T) {
diff --git a/s3/v2sign.go b/backend/s3/v2sign.go
similarity index 100%
rename from s3/v2sign.go
rename to backend/s3/v2sign.go
diff --git a/sftp/sftp.go b/backend/sftp/sftp.go
similarity index 100%
rename from sftp/sftp.go
rename to backend/sftp/sftp.go
diff --git a/sftp/sftp_internal_test.go b/backend/sftp/sftp_internal_test.go
similarity index 100%
rename from sftp/sftp_internal_test.go
rename to backend/sftp/sftp_internal_test.go
diff --git a/sftp/sftp_test.go b/backend/sftp/sftp_test.go
similarity index 99%
rename from sftp/sftp_test.go
rename to backend/sftp/sftp_test.go
index 9b56992d5..fa7d8b2bd 100644
--- a/sftp/sftp_test.go
+++ b/backend/sftp/sftp_test.go
@@ -7,9 +7,9 @@ package sftp_test
import (
"testing"
+ "github.com/ncw/rclone/backend/sftp"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/sftp"
)
func TestSetup(t *testing.T) {
diff --git a/sftp/sftp_unsupported.go b/backend/sftp/sftp_unsupported.go
similarity index 100%
rename from sftp/sftp_unsupported.go
rename to backend/sftp/sftp_unsupported.go
diff --git a/sftp/stringlock.go b/backend/sftp/stringlock.go
similarity index 100%
rename from sftp/stringlock.go
rename to backend/sftp/stringlock.go
diff --git a/sftp/stringlock_test.go b/backend/sftp/stringlock_test.go
similarity index 100%
rename from sftp/stringlock_test.go
rename to backend/sftp/stringlock_test.go
diff --git a/swift/auth.go b/backend/swift/auth.go
similarity index 100%
rename from swift/auth.go
rename to backend/swift/auth.go
diff --git a/swift/swift.go b/backend/swift/swift.go
similarity index 100%
rename from swift/swift.go
rename to backend/swift/swift.go
diff --git a/swift/swift_internal_test.go b/backend/swift/swift_internal_test.go
similarity index 100%
rename from swift/swift_internal_test.go
rename to backend/swift/swift_internal_test.go
diff --git a/swift/swift_test.go b/backend/swift/swift_test.go
similarity index 99%
rename from swift/swift_test.go
rename to backend/swift/swift_test.go
index 4524f8f2f..dce9d4072 100644
--- a/swift/swift_test.go
+++ b/backend/swift/swift_test.go
@@ -7,9 +7,9 @@ package swift_test
import (
"testing"
+ "github.com/ncw/rclone/backend/swift"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/swift"
)
func TestSetup(t *testing.T) {
diff --git a/webdav/api/types.go b/backend/webdav/api/types.go
similarity index 100%
rename from webdav/api/types.go
rename to backend/webdav/api/types.go
diff --git a/webdav/webdav.go b/backend/webdav/webdav.go
similarity index 99%
rename from webdav/webdav.go
rename to backend/webdav/webdav.go
index 6dde3b560..709510993 100644
--- a/webdav/webdav.go
+++ b/backend/webdav/webdav.go
@@ -28,10 +28,10 @@ import (
"strings"
"time"
+ "github.com/ncw/rclone/backend/webdav/api"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/pacer"
"github.com/ncw/rclone/rest"
- "github.com/ncw/rclone/webdav/api"
"github.com/pkg/errors"
)
diff --git a/webdav/webdav_test.go b/backend/webdav/webdav_test.go
similarity index 99%
rename from webdav/webdav_test.go
rename to backend/webdav/webdav_test.go
index 0e455af72..beb3193f0 100644
--- a/webdav/webdav_test.go
+++ b/backend/webdav/webdav_test.go
@@ -7,9 +7,9 @@ package webdav_test
import (
"testing"
+ "github.com/ncw/rclone/backend/webdav"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/webdav"
)
func TestSetup(t *testing.T) {
diff --git a/yandex/api/api_request.go b/backend/yandex/api/api_request.go
similarity index 100%
rename from yandex/api/api_request.go
rename to backend/yandex/api/api_request.go
diff --git a/yandex/api/api_upload.go b/backend/yandex/api/api_upload.go
similarity index 100%
rename from yandex/api/api_upload.go
rename to backend/yandex/api/api_upload.go
diff --git a/yandex/api/client.go b/backend/yandex/api/client.go
similarity index 100%
rename from yandex/api/client.go
rename to backend/yandex/api/client.go
diff --git a/yandex/api/custom_property.go b/backend/yandex/api/custom_property.go
similarity index 100%
rename from yandex/api/custom_property.go
rename to backend/yandex/api/custom_property.go
diff --git a/yandex/api/delete.go b/backend/yandex/api/delete.go
similarity index 100%
rename from yandex/api/delete.go
rename to backend/yandex/api/delete.go
diff --git a/yandex/api/disk_info_request.go b/backend/yandex/api/disk_info_request.go
similarity index 100%
rename from yandex/api/disk_info_request.go
rename to backend/yandex/api/disk_info_request.go
diff --git a/yandex/api/download.go b/backend/yandex/api/download.go
similarity index 100%
rename from yandex/api/download.go
rename to backend/yandex/api/download.go
diff --git a/yandex/api/empty_trash.go b/backend/yandex/api/empty_trash.go
similarity index 100%
rename from yandex/api/empty_trash.go
rename to backend/yandex/api/empty_trash.go
diff --git a/yandex/api/error.go b/backend/yandex/api/error.go
similarity index 100%
rename from yandex/api/error.go
rename to backend/yandex/api/error.go
diff --git a/yandex/api/errors.go b/backend/yandex/api/errors.go
similarity index 100%
rename from yandex/api/errors.go
rename to backend/yandex/api/errors.go
diff --git a/yandex/api/files_resource_list.go b/backend/yandex/api/files_resource_list.go
similarity index 100%
rename from yandex/api/files_resource_list.go
rename to backend/yandex/api/files_resource_list.go
diff --git a/yandex/api/flat_file_list_request.go b/backend/yandex/api/flat_file_list_request.go
similarity index 100%
rename from yandex/api/flat_file_list_request.go
rename to backend/yandex/api/flat_file_list_request.go
diff --git a/yandex/api/http_request.go b/backend/yandex/api/http_request.go
similarity index 100%
rename from yandex/api/http_request.go
rename to backend/yandex/api/http_request.go
diff --git a/yandex/api/last_uploaded_resource_list.go b/backend/yandex/api/last_uploaded_resource_list.go
similarity index 100%
rename from yandex/api/last_uploaded_resource_list.go
rename to backend/yandex/api/last_uploaded_resource_list.go
diff --git a/yandex/api/last_uploaded_resource_list_request.go b/backend/yandex/api/last_uploaded_resource_list_request.go
similarity index 100%
rename from yandex/api/last_uploaded_resource_list_request.go
rename to backend/yandex/api/last_uploaded_resource_list_request.go
diff --git a/yandex/api/media_type.go b/backend/yandex/api/media_type.go
similarity index 100%
rename from yandex/api/media_type.go
rename to backend/yandex/api/media_type.go
diff --git a/yandex/api/mkdir.go b/backend/yandex/api/mkdir.go
similarity index 100%
rename from yandex/api/mkdir.go
rename to backend/yandex/api/mkdir.go
diff --git a/yandex/api/performdelete.go b/backend/yandex/api/performdelete.go
similarity index 100%
rename from yandex/api/performdelete.go
rename to backend/yandex/api/performdelete.go
diff --git a/yandex/api/performdownload.go b/backend/yandex/api/performdownload.go
similarity index 100%
rename from yandex/api/performdownload.go
rename to backend/yandex/api/performdownload.go
diff --git a/yandex/api/performmkdir.go b/backend/yandex/api/performmkdir.go
similarity index 100%
rename from yandex/api/performmkdir.go
rename to backend/yandex/api/performmkdir.go
diff --git a/yandex/api/performupload.go b/backend/yandex/api/performupload.go
similarity index 100%
rename from yandex/api/performupload.go
rename to backend/yandex/api/performupload.go
diff --git a/yandex/api/preview_size.go b/backend/yandex/api/preview_size.go
similarity index 100%
rename from yandex/api/preview_size.go
rename to backend/yandex/api/preview_size.go
diff --git a/yandex/api/resource.go b/backend/yandex/api/resource.go
similarity index 100%
rename from yandex/api/resource.go
rename to backend/yandex/api/resource.go
diff --git a/yandex/api/resource_info_request.go b/backend/yandex/api/resource_info_request.go
similarity index 100%
rename from yandex/api/resource_info_request.go
rename to backend/yandex/api/resource_info_request.go
diff --git a/yandex/api/resource_info_request_helpers.go b/backend/yandex/api/resource_info_request_helpers.go
similarity index 100%
rename from yandex/api/resource_info_request_helpers.go
rename to backend/yandex/api/resource_info_request_helpers.go
diff --git a/yandex/api/resource_info_request_options.go b/backend/yandex/api/resource_info_request_options.go
similarity index 100%
rename from yandex/api/resource_info_request_options.go
rename to backend/yandex/api/resource_info_request_options.go
diff --git a/yandex/api/resource_list.go b/backend/yandex/api/resource_list.go
similarity index 100%
rename from yandex/api/resource_list.go
rename to backend/yandex/api/resource_list.go
diff --git a/yandex/api/sort_mode.go b/backend/yandex/api/sort_mode.go
similarity index 100%
rename from yandex/api/sort_mode.go
rename to backend/yandex/api/sort_mode.go
diff --git a/yandex/api/trash_resource_info_request.go b/backend/yandex/api/trash_resource_info_request.go
similarity index 100%
rename from yandex/api/trash_resource_info_request.go
rename to backend/yandex/api/trash_resource_info_request.go
diff --git a/yandex/api/upload.go b/backend/yandex/api/upload.go
similarity index 100%
rename from yandex/api/upload.go
rename to backend/yandex/api/upload.go
diff --git a/yandex/yandex.go b/backend/yandex/yandex.go
similarity index 99%
rename from yandex/yandex.go
rename to backend/yandex/yandex.go
index 3913c8486..181f9aeb4 100644
--- a/yandex/yandex.go
+++ b/backend/yandex/yandex.go
@@ -13,9 +13,9 @@ import (
"strings"
"time"
+ yandex "github.com/ncw/rclone/backend/yandex/api"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/oauthutil"
- yandex "github.com/ncw/rclone/yandex/api"
"github.com/pkg/errors"
"golang.org/x/oauth2"
)
diff --git a/yandex/yandex_test.go b/backend/yandex/yandex_test.go
similarity index 99%
rename from yandex/yandex_test.go
rename to backend/yandex/yandex_test.go
index 3684e4f15..5bc62ec7a 100644
--- a/yandex/yandex_test.go
+++ b/backend/yandex/yandex_test.go
@@ -7,9 +7,9 @@ package yandex_test
import (
"testing"
+ "github.com/ncw/rclone/backend/yandex"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/yandex"
)
func TestSetup(t *testing.T) {
diff --git a/cmd/cachestats/cachestats.go b/cmd/cachestats/cachestats.go
index 4fa2cc2d6..d47291016 100644
--- a/cmd/cachestats/cachestats.go
+++ b/cmd/cachestats/cachestats.go
@@ -6,7 +6,7 @@ import (
"encoding/json"
"fmt"
- "github.com/ncw/rclone/cache"
+ "github.com/ncw/rclone/backend/cache"
"github.com/ncw/rclone/cmd"
"github.com/ncw/rclone/fs"
"github.com/pkg/errors"
diff --git a/cmd/cryptcheck/cryptcheck.go b/cmd/cryptcheck/cryptcheck.go
index a68c89173..0a387a907 100644
--- a/cmd/cryptcheck/cryptcheck.go
+++ b/cmd/cryptcheck/cryptcheck.go
@@ -1,8 +1,8 @@
package cryptcheck
import (
+ "github.com/ncw/rclone/backend/crypt"
"github.com/ncw/rclone/cmd"
- "github.com/ncw/rclone/crypt"
"github.com/ncw/rclone/fs"
"github.com/pkg/errors"
"github.com/spf13/cobra"
diff --git a/cmd/cryptdecode/cryptdecode.go b/cmd/cryptdecode/cryptdecode.go
index fe46dd10f..be327fd5a 100644
--- a/cmd/cryptdecode/cryptdecode.go
+++ b/cmd/cryptdecode/cryptdecode.go
@@ -3,8 +3,8 @@ package cryptdecode
import (
"fmt"
+ "github.com/ncw/rclone/backend/crypt"
"github.com/ncw/rclone/cmd"
- "github.com/ncw/rclone/crypt"
"github.com/ncw/rclone/fs"
"github.com/pkg/errors"
"github.com/spf13/cobra"
diff --git a/cmd/lsf/lsf_test.go b/cmd/lsf/lsf_test.go
index 55d60515c..3b48ca39f 100644
--- a/cmd/lsf/lsf_test.go
+++ b/cmd/lsf/lsf_test.go
@@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
- _ "github.com/ncw/rclone/local"
+ _ "github.com/ncw/rclone/backend/local"
)
func TestDefaultLsf(t *testing.T) {
diff --git a/cmd/mountlib/mounttest/fs.go b/cmd/mountlib/mounttest/fs.go
index 8c0e90296..5b6585d9f 100644
--- a/cmd/mountlib/mounttest/fs.go
+++ b/cmd/mountlib/mounttest/fs.go
@@ -17,8 +17,8 @@ import (
"testing"
"time"
+ _ "github.com/ncw/rclone/backend/all" // import all the backends
"github.com/ncw/rclone/fs"
- _ "github.com/ncw/rclone/fs/all" // import all the file systems
"github.com/ncw/rclone/fstest"
"github.com/ncw/rclone/vfs"
"github.com/stretchr/testify/assert"
diff --git a/cmd/serve/http/http_test.go b/cmd/serve/http/http_test.go
index deb4ba264..aefb8e84d 100644
--- a/cmd/serve/http/http_test.go
+++ b/cmd/serve/http/http_test.go
@@ -12,8 +12,8 @@ import (
"testing"
"time"
+ _ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fs"
- _ "github.com/ncw/rclone/local"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/cmd/serve/webdav/webdav_test.go b/cmd/serve/webdav/webdav_test.go
index 496239bde..616078924 100644
--- a/cmd/serve/webdav/webdav_test.go
+++ b/cmd/serve/webdav/webdav_test.go
@@ -12,8 +12,8 @@ import (
"os/exec"
"testing"
+ _ "github.com/ncw/rclone/backend/local"
"github.com/ncw/rclone/fstest"
- _ "github.com/ncw/rclone/local"
"github.com/stretchr/testify/assert"
)
@@ -37,7 +37,7 @@ func TestWebDav(t *testing.T) {
// FIXME shut it down somehow?
// Change directory to run the tests
- err = os.Chdir("../../../webdav")
+ err = os.Chdir("../../../backend/webdav")
assert.NoError(t, err, "failed to cd to webdav remote")
// Run the webdav tests with an on the fly remote
diff --git a/cmd/touch/touch_test.go b/cmd/touch/touch_test.go
index a87c87959..b66194cf5 100644
--- a/cmd/touch/touch_test.go
+++ b/cmd/touch/touch_test.go
@@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
- _ "github.com/ncw/rclone/local"
+ _ "github.com/ncw/rclone/backend/local"
)
func TestTouch(t *testing.T) {
diff --git a/cmd/tree/tree_test.go b/cmd/tree/tree_test.go
index 62ac30425..63390927d 100644
--- a/cmd/tree/tree_test.go
+++ b/cmd/tree/tree_test.go
@@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
- _ "github.com/ncw/rclone/local"
+ _ "github.com/ncw/rclone/backend/local"
)
func TestTree(t *testing.T) {
diff --git a/fs/all/all.go b/fs/all/all.go
deleted file mode 100644
index eed17a9cc..000000000
--- a/fs/all/all.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package all
-
-import (
- // Active file systems
- _ "github.com/ncw/rclone/amazonclouddrive"
- _ "github.com/ncw/rclone/azureblob"
- _ "github.com/ncw/rclone/b2"
- _ "github.com/ncw/rclone/box"
- _ "github.com/ncw/rclone/cache"
- _ "github.com/ncw/rclone/crypt"
- _ "github.com/ncw/rclone/drive"
- _ "github.com/ncw/rclone/dropbox"
- _ "github.com/ncw/rclone/ftp"
- _ "github.com/ncw/rclone/googlecloudstorage"
- _ "github.com/ncw/rclone/http"
- _ "github.com/ncw/rclone/hubic"
- _ "github.com/ncw/rclone/local"
- _ "github.com/ncw/rclone/onedrive"
- _ "github.com/ncw/rclone/pcloud"
- _ "github.com/ncw/rclone/qingstor"
- _ "github.com/ncw/rclone/s3"
- _ "github.com/ncw/rclone/sftp"
- _ "github.com/ncw/rclone/swift"
- _ "github.com/ncw/rclone/webdav"
- _ "github.com/ncw/rclone/yandex"
-)
diff --git a/fs/hash.go b/fs/hash.go
index cdd2b0d36..f62afd184 100644
--- a/fs/hash.go
+++ b/fs/hash.go
@@ -9,7 +9,7 @@ import (
"io"
"strings"
- "github.com/ncw/rclone/dropbox/dbhash"
+ "github.com/ncw/rclone/backend/dropbox/dbhash"
"github.com/pkg/errors"
"github.com/spf13/pflag"
)
diff --git a/fs/operations_test.go b/fs/operations_test.go
index 8384ca79b..9ad0c47e4 100644
--- a/fs/operations_test.go
+++ b/fs/operations_test.go
@@ -30,8 +30,8 @@ import (
"testing"
"time"
+ _ "github.com/ncw/rclone/backend/all" // import all backends
"github.com/ncw/rclone/fs"
- _ "github.com/ncw/rclone/fs/all" // import all fs
"github.com/ncw/rclone/fstest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
diff --git a/fstest/fstests/gen_tests.go b/fstest/fstests/gen_tests.go
index 04e2fc051..bea51bf8e 100644
--- a/fstest/fstests/gen_tests.go
+++ b/fstest/fstests/gen_tests.go
@@ -63,10 +63,10 @@ package {{ .FsName }}_test
import (
"testing"
+ "github.com/ncw/rclone/backend/{{ .FsName }}"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fstest/fstests"
- "github.com/ncw/rclone/{{ .FsName }}"
-{{ if (or (eq .FsName "crypt") (eq .FsName "cache")) }} _ "github.com/ncw/rclone/local"
+{{ if (or (eq .FsName "crypt") (eq .FsName "cache")) }} _ "github.com/ncw/rclone/backend/local"
{{end}})
func TestSetup{{ .Suffix }}(t *testing.T)() {
@@ -106,7 +106,7 @@ func generateTestProgram(t *template.Template, fns []string, Fsname string, opti
}
data.TestName = "Test" + data.UpperFsName + data.Suffix + ":"
- outfile := "../../" + data.FsName + "/" + data.FsName + data.Suffix + "_test.go"
+ outfile := "../../backend/" + data.FsName + "/" + data.FsName + data.Suffix + "_test.go"
if data.FsName == "local" {
data.TestName = ""
diff --git a/rclone.go b/rclone.go
index 873b9f96c..f476ba44a 100644
--- a/rclone.go
+++ b/rclone.go
@@ -7,8 +7,9 @@ import (
"log"
"github.com/ncw/rclone/cmd"
- _ "github.com/ncw/rclone/cmd/all" // import all commands
- _ "github.com/ncw/rclone/fs/all" // import all fs
+
+ _ "github.com/ncw/rclone/backend/all" // import all backends
+ _ "github.com/ncw/rclone/cmd/all" // import all commands
)
func main() {
diff --git a/vfs/vfs_test.go b/vfs/vfs_test.go
index c332520fe..7e9ed183a 100644
--- a/vfs/vfs_test.go
+++ b/vfs/vfs_test.go
@@ -6,7 +6,7 @@ import (
"os"
"testing"
- _ "github.com/ncw/rclone/fs/all" // import all the file systems
+ _ "github.com/ncw/rclone/backend/all" // import all the backends
"github.com/ncw/rclone/fstest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"