repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/sftp/sftp_test.go
cmd/serve/sftp/sftp_test.go
// Serve sftp tests set up a server and run the integration tests // for the sftp remote against it. // // We skip tests on platforms with troublesome character mappings //go:build !windows && !darwin && !plan9 package sftp import ( "context" "strings" "testing" "github.com/pkg/sftp" _ "github.com/rclone/rclon...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/sftp/sftp_unsupported.go
cmd/serve/sftp/sftp_unsupported.go
// Build for sftp for unsupported platforms to stop go complaining // about "no buildable Go source files " //go:build plan9 // Package sftp implements an SFTP server to serve an rclone VFS package sftp import "github.com/spf13/cobra" // Command definition is nil to show not implemented var Command *cobra.Command
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/sftp/sftp.go
cmd/serve/sftp/sftp.go
//go:build !plan9 // Package sftp implements an SFTP server to serve an rclone VFS package sftp import ( "context" "fmt" "strings" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/cmd/serve" "github.com/rclone/rclone/cmd/serve/proxy" "github.com/rclone/rclone/cmd/serve/proxy/proxyflags" "github.com/r...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/sftp/connection.go
cmd/serve/sftp/connection.go
//go:build !plan9 package sftp import ( "context" "errors" "fmt" "io" "net" "os" "regexp" "strings" "github.com/pkg/sftp" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/hash" "github.com/rclone/rclone/lib/terminal" "github.com/rclone/rclone/vfs" "github.com/rclone/rclone/vfs/vfscommon" "go...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/sftp/connection_test.go
cmd/serve/sftp/connection_test.go
//go:build !plan9 package sftp import ( "fmt" "testing" "github.com/stretchr/testify/assert" ) func TestShellEscape(t *testing.T) { for i, test := range []struct { unescaped, escaped string }{ {"", ""}, {"/this/is/harmless", "/this/is/harmless"}, {"$(rm -rf /)", "\\$\\(rm\\ -rf\\ /\\)"}, {"/test/\n",...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/sftp/server.go
cmd/serve/sftp/server.go
//go:build !plan9 package sftp import ( "bytes" "context" "crypto/ecdsa" "crypto/ed25519" "crypto/elliptic" "crypto/rand" "crypto/rsa" "crypto/subtle" "crypto/x509" "encoding/base64" "encoding/pem" "errors" "fmt" "io" "net" "os" "path/filepath" "strings" "github.com/rclone/rclone/cmd/serve/proxy" ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/sftp/handler.go
cmd/serve/sftp/handler.go
//go:build !plan9 package sftp import ( "io" "os" "syscall" "time" "github.com/pkg/sftp" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/vfs" ) // vfsHandler converts the VFS to be served by SFTP type vfsHandler struct { *vfs.VFS } // vfsHandler returns a Handlers object with the test handlers. fun...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/systemd.go
cmd/serve/docker/systemd.go
//go:build linux && !android package docker import ( "os" "github.com/coreos/go-systemd/v22/activation" "github.com/coreos/go-systemd/v22/util" ) func systemdActivationFiles() []*os.File { if util.IsRunningSystemd() { return activation.Files(false) } return nil }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/volume.go
cmd/serve/docker/volume.go
package docker import ( "context" "errors" "fmt" "os" "path/filepath" "runtime" "sort" "time" "github.com/rclone/rclone/cmd/mountlib" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config" "github.com/rclone/rclone/fs/rc" "github.com/rclone/rclone/lib/file" ) // Errors var ( ErrVolumeNotFou...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/driver.go
cmd/serve/docker/driver.go
package docker import ( "context" "encoding/json" "fmt" "math/rand" "os" "path/filepath" "reflect" "sort" "sync" "time" "github.com/coreos/go-systemd/v22/daemon" "github.com/rclone/rclone/cmd/mountlib" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config" "github.com/rclone/rclone/lib/atex...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/api.go
cmd/serve/docker/api.go
package docker import ( "encoding/json" "net/http" "github.com/go-chi/chi/v5" "github.com/rclone/rclone/fs" ) const ( contentType = "application/vnd.docker.plugins.v1.1+json" activatePath = "/Plugin.Activate" createPath = "/VolumeDriver.Create" getPath = "/VolumeDriver.Get" listPath = "/VolumeDr...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/serve.go
cmd/serve/docker/serve.go
package docker import ( "context" "crypto/tls" "fmt" "net" "net/http" "os" "path/filepath" "runtime" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/lib/atexit" "github.com/rclone/rclone/lib/file" ) // Server connects plugin with docker daemon by protocol type Server http.Server // NewServer crea...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/docker.go
cmd/serve/docker/docker.go
// Package docker serves a remote suitable for use with docker volume api package docker import ( "context" _ "embed" "path/filepath" "strings" "syscall" "github.com/spf13/cobra" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/cmd/mountlib" "github.com/rclone/rclone/cmd/serve" "github.com/rclone/r...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/options_test.go
cmd/serve/docker/options_test.go
package docker import ( "testing" "time" "github.com/rclone/rclone/cmd/mountlib" "github.com/rclone/rclone/fs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" _ "github.com/rclone/rclone/backend/local" ) func TestApplyOptions(t *testing.T) { vol := &Volume{ Name: "testName...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/options.go
cmd/serve/docker/options.go
package docker import ( "fmt" "strings" "github.com/rclone/rclone/cmd/mountlib" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config/configmap" "github.com/rclone/rclone/fs/config/configstruct" "github.com/rclone/rclone/fs/fspath" "github.com/rclone/rclone/fs/rc" "github.com/rclone/rclone/vfs/vf...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/docker_test.go
cmd/serve/docker/docker_test.go
//go:build !race package docker_test import ( "bytes" "context" "encoding/json" "fmt" "io" "net" "net/http" "os" "path/filepath" "runtime" "strings" "testing" "time" "github.com/rclone/rclone/cmd/mountlib" "github.com/rclone/rclone/cmd/serve/docker" "github.com/rclone/rclone/fs" "github.com/rclone/r...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/unix_unsupported.go
cmd/serve/docker/unix_unsupported.go
//go:build !linux && !freebsd package docker import ( "errors" "net" ) func newUnixListener(path string, gid int) (net.Listener, string, error) { return nil, "", errors.New("unix sockets require Linux or FreeBSD") }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/unix.go
cmd/serve/docker/unix.go
//go:build linux || freebsd package docker import ( "fmt" "net" "os" "path/filepath" "github.com/rclone/rclone/lib/file" ) func newUnixListener(path string, gid int) (net.Listener, string, error) { // try systemd socket activation fds := systemdActivationFiles() switch len(fds) { case 0: // fall thru ca...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/docker/systemd_unsupported.go
cmd/serve/docker/systemd_unsupported.go
//go:build !linux || android package docker import ( "os" ) //lint:ignore U1000 unused when not building linux func systemdActivationFiles() []*os.File { return nil }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/webdav/webdav_test.go
cmd/serve/webdav/webdav_test.go
// Serve webdav tests set up a server and run the integration tests // for the webdav remote against it. // // We skip tests on platforms with troublesome character mappings //go:build !windows && !darwin package webdav import ( "context" "flag" "io" "net/http" "os" "strings" "testing" "time" _ "github.com...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/webdav/webdav.go
cmd/serve/webdav/webdav.go
// Package webdav implements a WebDAV server backed by rclone VFS package webdav import ( "context" "encoding/xml" "errors" "fmt" "mime" "net" "net/http" "os" "path" "strconv" "strings" "time" chi "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" "github.com/rclone/rclone/cmd" cmdserve ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/cms.go
cmd/serve/dlna/cms.go
package dlna import ( "net/http" "github.com/anacrolix/dms/upnp" ) const defaultProtocolInfo = "http-get:*:video/mpeg:*,http-get:*:video/mp4:*,http-get:*:video/vnd.dlna.mpeg-tts:*,http-get:*:video/avi:*,http-get:*:video/x-matroska:*,http-get:*:video/x-ms-wmv:*,http-get:*:video/wtv:*,http-get:*:audio/mpeg:*,http-ge...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/cds_test.go
cmd/serve/dlna/cds_test.go
package dlna import ( "context" "sort" "testing" localBackend "github.com/rclone/rclone/backend/local" "github.com/rclone/rclone/fs/config/configmap" "github.com/rclone/rclone/vfs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestMediaWithResources(t *testing.T) { fs, er...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/dlna_test.go
cmd/serve/dlna/dlna_test.go
package dlna import ( "bytes" "context" "fmt" "html" "io" "net/http" "os" "strings" "testing" "github.com/anacrolix/dms/soap" "github.com/rclone/rclone/cmd/serve/servetest" "github.com/rclone/rclone/fs/config/configfile" "github.com/rclone/rclone/fs/rc" "github.com/rclone/rclone/vfs" "github.com/rclon...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/cds.go
cmd/serve/dlna/cds.go
package dlna import ( "context" "encoding/xml" "errors" "fmt" "net/http" "net/url" "os" "path" "path/filepath" "regexp" "sort" "strings" "github.com/anacrolix/dms/dlna" "github.com/anacrolix/dms/upnp" "github.com/rclone/rclone/cmd/serve/dlna/upnpav" "github.com/rclone/rclone/fs" "github.com/rclone/rc...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/dlna.go
cmd/serve/dlna/dlna.go
// Package dlna provides DLNA server. package dlna import ( "bytes" "context" "encoding/xml" "fmt" "net" "net/http" "net/url" "os" "strconv" "strings" "time" dms_dlna "github.com/anacrolix/dms/dlna" "github.com/anacrolix/dms/soap" "github.com/anacrolix/dms/ssdp" "github.com/anacrolix/dms/upnp" "github...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/dlna_util.go
cmd/serve/dlna/dlna_util.go
package dlna import ( "context" "crypto/md5" "encoding/xml" "fmt" "io" "maps" "net" "net/http" "net/http/httptest" "net/http/httputil" "os" "github.com/anacrolix/dms/soap" "github.com/anacrolix/dms/upnp" "github.com/rclone/rclone/fs" ) // Return a default "friendly name" for the server. func makeDefaul...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/mrrs.go
cmd/serve/dlna/mrrs.go
package dlna import ( "net/http" "github.com/anacrolix/dms/upnp" ) type mediaReceiverRegistrarService struct { *server upnp.Eventing } func (mrrs *mediaReceiverRegistrarService) Handle(action string, argsXML []byte, r *http.Request) (map[string]string, error) { switch action { case "IsAuthorized", "IsValidate...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/upnpav/upnpav.go
cmd/serve/dlna/upnpav/upnpav.go
// Package upnpav provides utilities for DLNA server. package upnpav import ( "encoding/xml" "time" ) const ( // NoSuchObjectErrorCode : The specified ObjectID is invalid. NoSuchObjectErrorCode = 701 ) // Resource description type Resource struct { XMLName xml.Name `xml:"res"` ProtocolInfo string `xml:"...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/data/data.go
cmd/serve/dlna/data/data.go
// Package data provides utilities for DLNA server. // The "go:generate" directive compiles static assets by running assets_generate.go // //go:generate go run assets_generate.go package data import ( "fmt" "io" "text/template" "github.com/rclone/rclone/fs" ) // GetTemplate returns the rootDesc XML template func...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/data/assets_generate.go
cmd/serve/dlna/data/assets_generate.go
//go:generate go run assets_generate.go // The "go:generate" directive compiles static assets by running assets_generate.go //go:build ignore package main import ( "log" "net/http" "github.com/shurcooL/vfsgen" ) func main() { var AssetDir http.FileSystem = http.Dir("./static") err := vfsgen.Generate(AssetDir, ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/dlna/data/assets_vfsdata.go
cmd/serve/dlna/data/assets_vfsdata.go
// Code generated by vfsgen; DO NOT EDIT. //go:build !dev package data import ( "bytes" "compress/gzip" "fmt" "io" "net/http" "os" pathpkg "path" "time" ) // Assets statically implements the virtual filesystem provided to vfsgen. var Assets = func() http.FileSystem { fs := vfsgen۰FS{ "/": &vfsgen۰DirInfo...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/restic/restic.go
cmd/serve/restic/restic.go
// Package restic serves a remote suitable for use with restic package restic import ( "context" "encoding/json" "errors" "fmt" "net" "net/http" "os" "path" "regexp" "strings" "time" "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" "github.com/rclone/rclone/cmd" cmdserve "github.com/rcl...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/restic/cache.go
cmd/serve/restic/cache.go
package restic import ( "strings" "sync" "github.com/rclone/rclone/fs" ) // cache implements a simple object cache type cache struct { mu sync.RWMutex // protects the cache items map[string]fs.Object // cache of objects cacheObjects bool // whether we are actually cachi...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/restic/stdio_conn.go
cmd/serve/restic/stdio_conn.go
package restic import ( "net" "os" "time" ) // Addr implements net.Addr for stdin/stdout. type Addr struct{} // Network returns the network type as a string. func (a Addr) Network() string { return "stdio" } func (a Addr) String() string { return "stdio" } // StdioConn implements a net.Conn via stdin/stdout. ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/restic/cache_test.go
cmd/serve/restic/cache_test.go
package restic import ( "sort" "strings" "testing" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" ) func (c *cache) String() string { keys := []string{} c.mu.Lock() for k := range c.items { keys = append(keys, k) } c.mu.Unlock() sort.Strings(keys) return strings.Join(...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/restic/restic_test.go
cmd/serve/restic/restic_test.go
// Serve restic tests set up a server and run the integration tests // for restic against it. package restic import ( "context" "errors" "net/http" "net/http/httptest" "os" "os/exec" "testing" _ "github.com/rclone/rclone/backend/all" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/cmd/serve/servet...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/restic/restic_privaterepos_test.go
cmd/serve/restic/restic_privaterepos_test.go
package restic import ( "context" "crypto/rand" "io" "net/http" "strings" "testing" "github.com/rclone/rclone/cmd" "github.com/stretchr/testify/require" ) // newAuthenticatedRequest returns a new HTTP request with the given params. func newAuthenticatedRequest(t testing.TB, method, path string, body io.Reade...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/restic/restic_appendonly_test.go
cmd/serve/restic/restic_appendonly_test.go
package restic import ( "context" "crypto/rand" "encoding/hex" "io" "net/http" "strings" "testing" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs/config/configfile" "github.com/stretchr/testify/require" ) // createOverwriteDeleteSeq returns a sequence which will create a new file at // path, a...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/restic/restic_utils_test.go
cmd/serve/restic/restic_utils_test.go
package restic import ( "io" "net/http" "net/http/httptest" "testing" "github.com/stretchr/testify/assert" ) // declare a few helper functions // wantFunc tests the HTTP response in res and marks the test as errored if something is incorrect. type wantFunc func(t testing.TB, res *httptest.ResponseRecorder) //...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/s3/s3_test.go
cmd/serve/s3/s3_test.go
// Serve s3 tests set up a server and run the integration tests // for the s3 remote against it. package s3 import ( "bytes" "context" "fmt" "io" "net/url" "path" "path/filepath" "slices" "testing" "time" "github.com/minio/minio-go/v7" "github.com/minio/minio-go/v7/pkg/credentials" _ "github.com/rclone/...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/s3/s3.go
cmd/serve/s3/s3.go
package s3 import ( "context" _ "embed" "strings" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/cmd/serve" "github.com/rclone/rclone/cmd/serve/proxy" "github.com/rclone/rclone/cmd/serve/proxy/proxyflags" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config/configstruct" "github.com/r...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/s3/utils.go
cmd/serve/s3/utils.go
package s3 import ( "context" "encoding/hex" "errors" "io" "os" "path" "strings" "github.com/rclone/gofakes3" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/hash" "github.com/rclone/rclone/vfs" ) func getDirEntries(prefix string, VFS *vfs.VFS) (vfs.Nodes, error) { node, err := VFS.Stat(prefix...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/s3/list.go
cmd/serve/s3/list.go
package s3 import ( "path" "strings" "github.com/rclone/gofakes3" "github.com/rclone/rclone/vfs" ) func (b *s3Backend) entryListR(_vfs *vfs.VFS, bucket, fdPath, name string, addPrefix bool, response *gofakes3.ObjectList) error { fp := path.Join(bucket, fdPath) dirEntries, err := getDirEntries(fp, _vfs) if er...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/s3/server.go
cmd/serve/s3/server.go
// Package s3 implements a fake s3 server for rclone package s3 import ( "context" "crypto/md5" "encoding/hex" "errors" "fmt" "math/rand" "net" "net/http" "strings" "github.com/go-chi/chi/v5" "github.com/rclone/gofakes3" "github.com/rclone/gofakes3/signature" "github.com/rclone/rclone/cmd/serve/proxy" "...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/s3/backend.go
cmd/serve/s3/backend.go
// Package s3 implements an s3 server for rclone package s3 import ( "context" "encoding/hex" "io" "maps" "os" "path" "strings" "sync" "time" "github.com/ncw/swift/v2" "github.com/rclone/gofakes3" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/vfs" ) var ( emptyPrefix = &gofakes3.Prefix{} ) /...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/s3/pager.go
cmd/serve/s3/pager.go
// Package s3 implements a fake s3 server for rclone package s3 import ( "sort" "github.com/rclone/gofakes3" ) // pager splits the object list into smulitply pages. func (db *s3Backend) pager(list *gofakes3.ObjectList, page gofakes3.ListBucketPage) (*gofakes3.ObjectList, error) { // sort by alphabet sort.Slice(l...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/s3/logger.go
cmd/serve/s3/logger.go
package s3 import ( "fmt" "strings" "github.com/rclone/gofakes3" "github.com/rclone/rclone/fs" ) // logger output formatted message type logger struct{} // print log message func (l logger) Print(level gofakes3.LogLevel, v ...any) { var b strings.Builder for i := range v { if i > 0 { fmt.Fprintf(&b, " ")...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/s3/ioutils.go
cmd/serve/s3/ioutils.go
package s3 import "io" type noOpReadCloser struct{} type readerWithCloser struct { io.Reader closer func() error } var _ io.ReadCloser = &readerWithCloser{} func (d noOpReadCloser) Read(b []byte) (n int, err error) { return 0, io.EOF } func (d noOpReadCloser) Close() error { return nil } func limitReadCloser...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/ftp/ftp.go
cmd/serve/ftp/ftp.go
//go:build !plan9 // Package ftp implements an FTP server for rclone package ftp import ( "context" "errors" "fmt" "io" iofs "io/fs" "net" "os" "os/user" "regexp" "strconv" "strings" "sync" "time" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/cmd/serve" "github.com/rclone/rclone/cmd/serve/...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/ftp/ftp_test.go
cmd/serve/ftp/ftp_test.go
// Serve ftp tests set up a server and run the integration tests // for the ftp remote against it. // // We skip tests on platforms with troublesome character mappings //go:build !windows && !darwin && !plan9 package ftp import ( "context" "testing" _ "github.com/rclone/rclone/backend/local" "github.com/rclone/...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/ftp/ftp_unsupported.go
cmd/serve/ftp/ftp_unsupported.go
// Build for unsupported platforms to stop go complaining // about "no buildable Go source files " //go:build plan9 // Package ftp implements an FTP server for rclone package ftp import "github.com/spf13/cobra" // Command definition is nil to show not implemented var Command *cobra.Command
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/http/http_test.go
cmd/serve/http/http_test.go
package http import ( "context" "flag" "io" stdfs "io/fs" "net/http" "os" "path/filepath" "strings" "testing" "time" _ "github.com/rclone/rclone/backend/local" "github.com/rclone/rclone/cmd/serve/proxy" "github.com/rclone/rclone/cmd/serve/servetest" "github.com/rclone/rclone/fs" "github.com/rclone/rclo...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/http/http.go
cmd/serve/http/http.go
// Package http provides common functionality for http servers package http import ( "context" "errors" "fmt" "io" "net" "net/http" "os" "path" "strconv" "strings" "time" "github.com/go-chi/chi/v5/middleware" "github.com/rclone/rclone/cmd" cmdserve "github.com/rclone/rclone/cmd/serve" "github.com/rclon...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/servetest/rc.go
cmd/serve/servetest/rc.go
package servetest import ( "context" "fmt" "net" "strings" "testing" "time" "github.com/rclone/rclone/fs/rc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // GetEphemeralPort opens a listening port on localhost:0, closes it, // and returns the address as "localhost:port". func...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/servetest/servetest.go
cmd/serve/servetest/servetest.go
// Package servetest provides infrastructure for running loopback // tests of "rclone serve backend:" against the backend integration // tests. package servetest import ( "context" "flag" "fmt" "os" "os/exec" "path/filepath" "strings" "testing" "github.com/rclone/rclone/cmd/serve/proxy" "github.com/rclone/r...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/serve/servetest/proxy_code.go
cmd/serve/servetest/proxy_code.go
//go:build ignore // A simple auth proxy for testing purposes package main import ( "encoding/json" "log" "os" ) func main() { if len(os.Args) < 2 { log.Fatalf("Syntax: %s <root>", os.Args[0]) } root := os.Args[1] // Read the input var in map[string]string err := json.NewDecoder(os.Stdin).Decode(&in) if...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/ls/ls.go
cmd/ls/ls.go
// Package ls provides the ls command. package ls import ( "context" "os" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/cmd/ls/lshelp" "github.com/rclone/rclone/fs/operations" "github.com/spf13/cobra" ) func init() { cmd.Root.AddCommand(commandDefinition) } var commandDefinition = &cobra.Command{ ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/ls/lshelp/lshelp.go
cmd/ls/lshelp/lshelp.go
// Package lshelp provides common help for list commands. package lshelp import ( "strings" ) // Help describes the common help for all the list commands // Warning! "|" will be replaced by backticks below var Help = strings.ReplaceAll(`Any of the filtering options can be applied to this command. There are several ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/listremotes/listremotes.go
cmd/listremotes/listremotes.go
// Package ls provides the ls command. package ls import ( "encoding/json" "fmt" "os" "regexp" "sort" "strings" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config" "github.com/rclone/rclone/fs/config/flags" "github.com/rclone/rclone/fs/filter" "github.com/spf1...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/obscure/obscure.go
cmd/obscure/obscure.go
// Package obscure provides the obscure command. package obscure import ( "bufio" "fmt" "os" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs/config/obscure" "github.com/spf13/cobra" ) func init() { cmd.Root.AddCommand(commandDefinition) } var commandDefinition = &cobra.Command{ Use: "obscure ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/size/size.go
cmd/size/size.go
// Package size provides the size command. package size import ( "context" "encoding/json" "os" "strconv" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config/flags" "github.com/rclone/rclone/fs/operations" "github.com/spf13/cobra" ) var jsonOutput bool func init...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/tree/tree.go
cmd/tree/tree.go
// Package tree provides the tree command. package tree import ( "context" "fmt" "io" "os" "path" "path/filepath" "strings" "time" "github.com/a8m/tree" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config/flags" "github.com/rclone/rclone/fs/dirtree" "github.c...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/tree/tree_test.go
cmd/tree/tree_test.go
package tree import ( "bytes" "context" "testing" "github.com/a8m/tree" _ "github.com/rclone/rclone/backend/local" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestTree(t *testing.T) { fstest.Initialise() ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/reveal/reveal.go
cmd/reveal/reveal.go
// Package reveal provides the reveal command. package reveal import ( "fmt" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs/config/obscure" "github.com/spf13/cobra" ) func init() { cmd.Root.AddCommand(commandDefinition) } var commandDefinition = &cobra.Command{ Use: "reveal password", Short: `...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/genautocomplete/genautocomplete_fish.go
cmd/genautocomplete/genautocomplete_fish.go
package genautocomplete import ( "fmt" "os" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs" "github.com/spf13/cobra" ) func init() { completionDefinition.AddCommand(fishCommandDefinition) } var fishCommandDefinition = &cobra.Command{ Use: "fish [output_file]", Short: `Output fish completion s...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/genautocomplete/genautocomplete_powershell.go
cmd/genautocomplete/genautocomplete_powershell.go
package genautocomplete import ( "fmt" "os" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs" "github.com/spf13/cobra" ) func init() { completionDefinition.AddCommand(powershellCommandDefinition) } var powershellCommandDefinition = &cobra.Command{ Use: "powershell [output_file]", Short: `Output...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/genautocomplete/genautocomplete_bash.go
cmd/genautocomplete/genautocomplete_bash.go
package genautocomplete import ( "fmt" "os" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs" "github.com/spf13/cobra" ) func init() { completionDefinition.AddCommand(bashCommandDefinition) } var bashCommandDefinition = &cobra.Command{ Use: "bash [output_file]", Short: `Output bash completion s...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/genautocomplete/genautocomplete_zsh.go
cmd/genautocomplete/genautocomplete_zsh.go
package genautocomplete import ( "fmt" "os" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs" "github.com/spf13/cobra" ) func init() { completionDefinition.AddCommand(zshCommandDefinition) } var zshCommandDefinition = &cobra.Command{ Use: "zsh [output_file]", Short: `Output zsh completion scrip...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/genautocomplete/genautocomplete_test.go
cmd/genautocomplete/genautocomplete_test.go
package genautocomplete import ( "os" "testing" "github.com/stretchr/testify/assert" ) func TestCompletionBash(t *testing.T) { tempFile, err := os.CreateTemp("", "completion_bash") assert.NoError(t, err) defer func() { _ = tempFile.Close() _ = os.Remove(tempFile.Name()) }() bashCommandDefinition.Run(bas...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/genautocomplete/genautocomplete.go
cmd/genautocomplete/genautocomplete.go
// Package genautocomplete provides the completion command. package genautocomplete import ( "github.com/rclone/rclone/cmd" "github.com/spf13/cobra" ) func init() { cmd.Root.AddCommand(completionDefinition) } var completionDefinition = &cobra.Command{ Use: "completion [shell]", Short: `Output completion scrip...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/sync/sync.go
cmd/sync/sync.go
// Package sync provides the sync command. package sync import ( "context" "strings" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs/config/flags" "github.com/rclone/rclone/fs/operations" "github.com/rclone/rclone/fs/operations/operationsflags" "github.com/rclone/rclone/fs/sync" "github.com/spf13/...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmd/hashsum/hashsum.go
cmd/hashsum/hashsum.go
// Package hashsum provides the hashsum command. package hashsum import ( "context" "fmt" "os" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config/flags" "github.com/rclone/rclone/fs/hash" "github.com/rclone/rclone/fs/operations" "github.com/spf13/cobra" "github....
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/dropbox/dropbox_internal_test.go
backend/dropbox/dropbox_internal_test.go
package dropbox import ( "context" "io" "strings" "testing" "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files" "github.com/rclone/rclone/fstest/fstests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func Te...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/dropbox/dropbox_test.go
backend/dropbox/dropbox_test.go
// Test Dropbox filesystem interface package dropbox import ( "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest/fstests" ) // TestIntegration runs integration tests against the remote func TestIntegration(t *testing.T) { fstests.Run(t, &fstests.Opt{ RemoteName: "TestDropbox:", NilObjec...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/dropbox/batcher.go
backend/dropbox/batcher.go
// This file contains the implementation of the sync batcher for uploads // // Dropbox rules say you can start as many batches as you want, but // you may only have one batch being committed and must wait for the // batch to be finished before committing another. package dropbox import ( "context" "fmt" "github.c...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/dropbox/dropbox.go
backend/dropbox/dropbox.go
// Package dropbox provides an interface to Dropbox object storage package dropbox // FIXME dropbox for business would be quite easy to add /* The Case folding of PathDisplay problem From the docs: path_display String. The cased path to be used for display purposes only. In rare instances the casing will not correc...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
true
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/dropbox/dbhash/dbhash_test.go
backend/dropbox/dbhash/dbhash_test.go
package dbhash_test import ( "encoding/hex" "fmt" "testing" "github.com/rclone/rclone/backend/dropbox/dbhash" "github.com/stretchr/testify/assert" ) func testChunk(t *testing.T, chunk int) { data := make([]byte, chunk) for i := range chunk { data[i] = 'A' } for _, test := range []struct { n int wan...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/dropbox/dbhash/dbhash.go
backend/dropbox/dbhash/dbhash.go
// Package dbhash implements the dropbox hash as described in // // https://www.dropbox.com/developers/reference/content-hash package dbhash import ( "crypto/sha256" "hash" ) const ( // BlockSize of the checksum in bytes. BlockSize = sha256.BlockSize // Size of the checksum in bytes. Size = sha256....
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/zenodo.go
backend/doi/zenodo.go
// Implementation for Zenodo package doi import ( "context" "fmt" "net/url" "regexp" "github.com/rclone/rclone/backend/doi/api" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/lib/rest" ) var zenodoRecordRegex = regexp.MustCompile(`zenodo[.](.+)`) // Resolve the main API endpoint for a DOI hosted on...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/link_header.go
backend/doi/link_header.go
package doi import ( "regexp" "strings" ) var linkRegex = regexp.MustCompile(`^<(.+)>$`) var valueRegex = regexp.MustCompile(`^"(.+)"$`) // headerLink represents a link as presented in HTTP headers // MDN Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Link type headerLink struct { ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/doi_internal_test.go
backend/doi/doi_internal_test.go
package doi import ( "context" "crypto/md5" "encoding/hex" "encoding/json" "io" "net/http" "net/http/httptest" "net/url" "sort" "strings" "testing" "time" "github.com/rclone/rclone/backend/doi/api" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config/configmap" "github.com/rclone/rclone/f...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/invenio.go
backend/doi/invenio.go
// Implementation for InvenioRDM package doi import ( "context" "fmt" "net/http" "net/url" "regexp" "strings" "time" "github.com/rclone/rclone/backend/doi/api" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/lib/rest" ) var invenioRecordRegex = regexp.MustCompile(`\/records?\/(.+)`) // Returns tr...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/doi_test.go
backend/doi/doi_test.go
// Test DOI filesystem interface package doi import ( "testing" "github.com/rclone/rclone/fstest/fstests" ) // TestIntegration runs integration tests against the remote func TestIntegration(t *testing.T) { fstests.Run(t, &fstests.Opt{ RemoteName: "TestDoi:", NilObject: (*Object)(nil), }) }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/doi.go
backend/doi/doi.go
// Package doi provides a filesystem interface for digital objects identified by DOIs. // // See: https://www.doi.org/the-identifier/what-is-a-doi/ package doi import ( "context" "errors" "fmt" "io" "net/http" "net/url" "path" "strings" "time" "github.com/rclone/rclone/backend/doi/api" "github.com/rclone/r...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/dataverse.go
backend/doi/dataverse.go
// Implementation for Dataverse package doi import ( "context" "fmt" "net/http" "net/url" "path" "strings" "time" "github.com/rclone/rclone/backend/doi/api" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/lib/rest" ) // Returns true if resolvedURL is likely a DOI hosted on a Dataverse intallation ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/link_header_internal_test.go
backend/doi/link_header_internal_test.go
package doi import ( "testing" "github.com/stretchr/testify/assert" ) func TestParseLinkHeader(t *testing.T) { header := "<https://zenodo.org/api/records/15063252> ; rel=\"linkset\" ; type=\"application/linkset+json\"" links := parseLinkHeader(header) expected := headerLink{ Href: "https://zenodo.org/api/re...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/api/dataversetypes.go
backend/doi/api/dataversetypes.go
// Type definitions specific to Dataverse package api // DataverseDatasetResponse is returned by the Dataverse dataset API type DataverseDatasetResponse struct { Status string `json:"status"` Data DataverseDataset `json:"data"` } // DataverseDataset is the representation of a dataset type DataverseData...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/api/types.go
backend/doi/api/types.go
// Package api has general type definitions for doi package api // DoiResolverResponse is returned by the DOI resolver API // // Reference: https://www.doi.org/the-identifier/resources/factsheets/doi-resolution-documentation type DoiResolverResponse struct { ResponseCode int `json:"responseCode...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/doi/api/inveniotypes.go
backend/doi/api/inveniotypes.go
// Type definitions specific to InvenioRDM package api // InvenioRecordResponse is the representation of a record stored in InvenioRDM type InvenioRecordResponse struct { Links InvenioRecordResponseLinks `json:"links"` } // InvenioRecordResponseLinks represents a record's links type InvenioRecordResponseLinks struc...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/drive/drive_internal_test.go
backend/drive/drive_internal_test.go
package drive import ( "bytes" "context" "encoding/json" "errors" "fmt" "io" "mime" "os" "path" "path/filepath" "strings" "testing" "time" _ "github.com/rclone/rclone/backend/local" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/filter" "github.com/rclone/rclone/fs/fserrors" "github.com/...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/drive/drive.go
backend/drive/drive.go
// Package drive interfaces with the Google Drive object storage system package drive // FIXME need to deal with some corner cases // * multiple files with the same name // * files can be in multiple directories // * can have directory loops // * files with / in name import ( "bytes" "context" "crypto/tls" "error...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
true
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/drive/metadata.go
backend/drive/metadata.go
package drive import ( "context" "encoding/json" "fmt" "maps" "strconv" "strings" "sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/fserrors" "github.com/rclone/rclone/lib/errcount" "golang.org/x/sync/errgroup" drive "google.golang.org/api/drive/v3" "google.golang.org/api/googleapi" ) //...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/drive/drive_test.go
backend/drive/drive_test.go
// Test Drive filesystem interface package drive import ( "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest/fstests" ) // TestIntegration runs integration tests against the remote func TestIntegration(t *testing.T) { fstests.Run(t, &fstests.Opt{ RemoteName: "TestDrive:", NilObject: (...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/drive/upload.go
backend/drive/upload.go
// Upload for drive // // Docs // Resumable upload: https://developers.google.com/drive/web/manage-uploads#resumable // Best practices: https://developers.google.com/drive/web/manage-uploads#best-practices // Files insert: https://developers.google.com/drive/v2/reference/files/insert // Files update: https://developers...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/smb/smb_test.go
backend/smb/smb_test.go
// Test smb filesystem interface package smb_test import ( "path/filepath" "testing" "github.com/rclone/rclone/backend/smb" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/fstest/fstests" ) // TestIntegration runs integration tests against the remote func TestIntegration(t *testing.T) { fstests.Run...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/smb/connpool.go
backend/smb/connpool.go
package smb import ( "context" "errors" "fmt" "net" "os" "time" smb2 "github.com/cloudsoda/go-smb2" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" "github.com/rclone/rclone/fs/config/obscure" "github.com/rclone/rclone/fs/fshttp" "golang.org/x/sync/errgroup" ) // dial starts a clie...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/smb/smb.go
backend/smb/smb.go
// Package smb provides an interface to SMB servers package smb import ( "context" "errors" "fmt" "io" "os" "path" "strings" "sync" "sync/atomic" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config" "github.com/rclone/rclone/fs/config/configmap" "github.com/rclone/rclone/fs/config/c...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/smb/kerberos_test.go
backend/smb/kerberos_test.go
package smb import ( "os" "path/filepath" "testing" "time" "github.com/jcmturner/gokrb5/v8/client" "github.com/jcmturner/gokrb5/v8/config" "github.com/jcmturner/gokrb5/v8/credentials" "github.com/stretchr/testify/assert" ) func TestResolveCcachePath(t *testing.T) { tmpDir := t.TempDir() // Setup: files fo...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/backend/smb/filepool.go
backend/smb/filepool.go
package smb import ( "context" "fmt" "os" "sync" "github.com/cloudsoda/go-smb2" "golang.org/x/sync/errgroup" ) // FsInterface defines the methods that filePool needs from Fs type FsInterface interface { getConnection(ctx context.Context, share string) (*conn, error) putConnection(pc **conn, err error) remov...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false