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/lib/http/serve/dir_test.go
lib/http/serve/dir_test.go
package serve import ( "context" "errors" "html/template" "io" "net/http" "net/http/httptest" "net/url" "testing" "time" libhttp "github.com/rclone/rclone/lib/http" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func GetTemplate(t *testing.T) *template.Template { htmlTempla...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/lib/http/serve/serve.go
lib/http/serve/serve.go
// Package serve deals with serving objects over HTTP package serve import ( "fmt" "io" "net/http" "path" "strconv" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" ) // Object serves an fs.Object via HEAD or GET func Object(w http.ResponseWriter, r *http.Request, o fs.Object) { if r.Me...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/lib/http/serve/serve_test.go
lib/http/serve/serve_test.go
package serve import ( "context" "io" "net/http" "net/http/httptest" "testing" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/object" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" ) func TestObjectBadMethod(t *testing.T) { w := httptest.NewRecorder() ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/lib/http/serve/dir.go
lib/http/serve/dir.go
package serve import ( "bytes" "context" "fmt" "html/template" "net/http" "net/url" "path" "sort" "strings" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" "github.com/rclone/rclone/lib/rest" ) // DirEntry is a directory entry type DirEntry struct { remote string URL ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/lib/errcount/errcount.go
lib/errcount/errcount.go
// Package errcount provides an easy to use error counter which // returns error count and last error so as to not overwhelm the user // with errors. package errcount import ( "fmt" "sync" ) // ErrCount stores the state of the error counter. type ErrCount struct { mu sync.Mutex lastErr error count int } ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/lib/errcount/errcount_test.go
lib/errcount/errcount_test.go
package errcount import ( "errors" "testing" "github.com/stretchr/testify/assert" ) func TestErrCount(t *testing.T) { ec := New() assert.Equal(t, nil, ec.Err("none")) e1 := errors.New("one") ec.Add(e1) err := ec.Err("stuff") assert.True(t, errors.Is(err, e1), err) assert.Equal(t, "stuff: one", err.Error(...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/newfs_internal_test.go
fs/newfs_internal_test.go
package fs import ( "context" "testing" "github.com/rclone/rclone/fs/config/configmap" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // When no override/global keys exist, ctx must be returned unchanged. func TestAddConfigToContext_NoChanges(t *testing.T) { ctx := context.Backgro...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/terminalcolormode.go
fs/terminalcolormode.go
package fs // TerminalColorMode describes how ANSI codes should be handled type TerminalColorMode = Enum[terminalColorModeChoices] // TerminalColorMode constants const ( TerminalColorModeAuto TerminalColorMode = iota TerminalColorModeNever TerminalColorModeAlways ) type terminalColorModeChoices struct{} func (te...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/registry.go
fs/registry.go
// Filesystem registry and backend options package fs import ( "context" "encoding/json" "fmt" "reflect" "regexp" "slices" "sort" "strings" "sync" "github.com/rclone/rclone/fs/config/configmap" "github.com/rclone/rclone/fs/config/configstruct" "github.com/rclone/rclone/lib/errcount" ) // Registry of fil...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/bits.go
fs/bits.go
package fs import ( "encoding/json" "fmt" "strings" ) // Bits is an option which can be any combination of the Choices. // // Suggested implementation is something like this: // // type bits = Bits[bitsChoices] // // const ( // bitA bits = 1 << iota // bitB // bitC // ) // // type bitsChoices struct{} // // fun...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/bwtimetable_test.go
fs/bwtimetable_test.go
package fs import ( "encoding/json" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interfaces var ( _ Flagger = (*BwTimetable)(nil) _ FlaggerNP = BwTimetable{} ) func TestBwTimetableSet(t *testing.T) { for _, test := range []struct {...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
true
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/backend_config.go
fs/backend_config.go
// Structures and utilities for backend config // // package fs import ( "context" "errors" "fmt" "slices" "strconv" "strings" "github.com/rclone/rclone/fs/config/configmap" ) const ( // ConfigToken is the key used to store the token under ConfigToken = "token" // ConfigKeyEphemeralPrefix marks config ke...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/pacer_test.go
fs/pacer_test.go
package fs import ( "context" "errors" "sync" "testing" "time" "github.com/rclone/rclone/fs/fserrors" "github.com/rclone/rclone/lib/pacer" "github.com/stretchr/testify/require" ) var errFoo = errors.New("foo") type dummyPaced struct { retry bool called int wait *sync.Cond } func (dp *dummyPaced) fn()...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log_test.go
fs/log_test.go
package fs import ( "encoding/json" "fmt" "strconv" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interfaces var ( _ Flagger = (*LogLevel)(nil) _ FlaggerNP = LogLevel(0) _ fmt.Stringer = LogValueItem{} ) type withString struct{} fu...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/bwtimetable.go
fs/bwtimetable.go
package fs import ( "encoding/json" "errors" "fmt" "strconv" "strings" "time" ) // BwPair represents an upload and a download bandwidth type BwPair struct { Tx SizeSuffix // upload bandwidth Rx SizeSuffix // download bandwidth } // String returns a printable representation of a BwPair func (bp *BwPair) Strin...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/mimetype.go
fs/mimetype.go
package fs import ( "context" "mime" "path" "strings" ) // Add a minimal number of mime types to augment go's built in types // for environments which don't have access to a mime.types file (e.g. // Termux on android) func init() { for _, t := range []struct { mimeType string extensions string }{ {"audi...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config_list_test.go
fs/config_list_test.go
package fs import ( "fmt" "testing" "github.com/stretchr/testify/require" ) func must(err error) { if err != nil { panic(err) } } func ExampleSpaceSepList() { for _, s := range []string{ `remotea:test/dir remoteb:`, `"remotea:test/space dir" remoteb:`, `"remotea:test/quote""dir" remoteb:`, } { var ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/features.go
fs/features.go
// Filesystem features and optional interfaces package fs import ( "context" "io" "reflect" "strings" "time" ) // Features describe the optional features of the Fs type Features struct { // Feature flags, whether Fs CaseInsensitive bool // has case insensitive files DuplicateFiles bool // ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/cutoffmode_test.go
fs/cutoffmode_test.go
package fs import ( "encoding/json" "strconv" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interfaces var ( _ Flagger = (*CutoffMode)(nil) _ FlaggerNP = CutoffMode(0) ) func TestCutoffModeString(t *testing.T) { for _, test := range []stru...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/types.go
fs/types.go
// Filesystem related types and interfaces // Note that optional interfaces are found in features.go package fs import ( "context" "encoding/json" "io" "math" "time" "github.com/rclone/rclone/fs/hash" ) // Fs is the interface a cloud storage system must provide type Fs interface { Info // List the objects ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/mount_helper.go
fs/mount_helper.go
package fs import ( "errors" "fmt" "os" "path/filepath" "runtime" "strings" ) func init() { // This block is run super-early, before configuration harness kick in if IsMountHelper() { if args, err := convertMountHelperArgs(os.Args); err == nil { os.Args = args } else { Fatalf(nil, "Failed to parse c...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/open_options_test.go
fs/open_options_test.go
package fs import ( "fmt" "net/http" "testing" "github.com/rclone/rclone/fs/hash" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestParseRangeOption(t *testing.T) { for _, test := range []struct { in string want RangeOption err string }{ {in: "", err: "doesn't s...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/override_dir_test.go
fs/override_dir_test.go
package fs // Check interfaces satisfied var _ Directory = (*OverrideDirectory)(nil)
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/dir_wrapper.go
fs/dir_wrapper.go
package fs import ( "context" "time" ) // DirWrapper wraps a Directory object so the Remote can be overridden type DirWrapper struct { Directory // Directory we are wrapping remote string // name of the directory failSilently bool // if set, ErrorNotImplemented should not be considered an error...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config.go
fs/config.go
package fs import ( "context" "errors" "fmt" "net" "os" "strconv" "strings" "time" ) // Global var ( // globalConfig for rclone globalConfig = new(ConfigInfo) // Read a value from the config file // // This is a function pointer to decouple the config // implementation from the fs ConfigFileGet = func...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/metadata.go
fs/metadata.go
package fs import ( "bytes" "context" "encoding/json" "fmt" "os/exec" "strings" "time" ) // Metadata represents Object metadata in a standardised form // // See docs/content/metadata.md for the interpretation of the keys type Metadata map[string]string // MetadataHelp represents help for a bit of system metad...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/tristate_test.go
fs/tristate_test.go
package fs import ( "encoding/json" "fmt" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interfaces var ( _ Flagger = (*Tristate)(nil) _ FlaggerNP = Tristate{} ) func TestTristateString(t *testing.T) { for _, test := range []struct { in ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/daemon_unix.go
fs/daemon_unix.go
// Daemonization interface for Unix platforms (common definitions) //go:build !windows && !plan9 && !js package fs import ( "os" ) // We use a special environment variable to let the child process know its role. const ( DaemonMarkVar = "_RCLONE_DAEMON_" DaemonMarkChild = "_rclone_daemon_" ) // IsDaemon return...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/versioncheck.go
fs/versioncheck.go
//go:build !go1.24 package fs // Upgrade to Go version 1.24 to compile rclone - latest stable go // compiler recommended. func init() { Go_version_1_24_required_for_compilation() }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/pacer.go
fs/pacer.go
// Pacer with logging and calculator package fs import ( "context" "time" "github.com/rclone/rclone/fs/fserrors" "github.com/rclone/rclone/lib/pacer" ) // Pacer is a simple wrapper around a pacer.Pacer with logging. type Pacer struct { *pacer.Pacer } type logCalculator struct { pacer.Calculator } // NewPace...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/metadata_mapper_code.go
fs/metadata_mapper_code.go
//go:build ignore // A simple metadata mapper for testing purposes package main import ( "encoding/json" "fmt" "log" "os" ) func check[T comparable](in map[string]any, key string, want T) { value, ok := in[key] if !ok { fmt.Fprintf(os.Stderr, "%s key not found\n", key) os.Exit(1) } if value.(T) != want {...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/versiontag.go
fs/versiontag.go
package fs // VersionTag of rclone var VersionTag = "v1.73.0"
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/parsetime_test.go
fs/parsetime_test.go
package fs import ( "encoding/json" "fmt" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interfaces var ( _ Flagger = (*Time)(nil) _ FlaggerNP = Time{} ) func TestParseTime(t *testing.T) { now := time.Date(2020, 9, 5, 8, 15, 5, 250,...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/bits_test.go
fs/bits_test.go
package fs import ( "encoding/json" "fmt" "strconv" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) type bits = Bits[bitsChoices] const ( bitA bits = 1 << iota bitB bitC ) type bitsChoices struct{} func (bitsChoices) Choices() []BitsChoicesInfo { return []BitsChoic...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/fingerprint.go
fs/fingerprint.go
package fs import ( "context" "fmt" "strings" "github.com/rclone/rclone/fs/hash" ) // Fingerprint produces a unique-ish string for an object. // // This is for detecting whether an object has changed since we last // saw it, not for checking object identity between two different // remotes - operations.Equal sho...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/open_options.go
fs/open_options.go
// Options for Open package fs import ( "context" "errors" "fmt" "net/http" "strconv" "strings" "github.com/rclone/rclone/fs/hash" ) // OpenOption is an interface describing options for Open type OpenOption interface { fmt.Stringer // Header returns the option as an HTTP header Header() (key string, valu...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log.go
fs/log.go
package fs import ( "context" "encoding/json" "fmt" "log/slog" "os" "slices" "strings" "github.com/rclone/rclone/lib/caller" ) // LogLevel describes rclone's logs. These are a subset of the syslog log levels. type LogLevel = Enum[logLevelChoices] // Log levels. These are the syslog levels of which we only...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/fs_test.go
fs/fs_test.go
package fs import ( "context" "strings" "testing" "github.com/stretchr/testify/assert" ) func TestFeaturesDisable(t *testing.T) { ft := new(Features) ft.Copy = func(ctx context.Context, src Object, remote string) (Object, error) { return nil, nil } ft.CaseInsensitive = true assert.NotNil(t, ft.Copy) ass...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config_test.go
fs/config_test.go
package fs import ( "context" "testing" "github.com/stretchr/testify/assert" ) func TestGetConfig(t *testing.T) { ctx := context.Background() // Check nil //lint:ignore SA1012 false positive when running staticcheck, we want to test passing a nil Context and therefore ignore lint suggestion to use context.TOD...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/dump_test.go
fs/dump_test.go
package fs import ( "encoding/json" "strconv" "testing" "github.com/stretchr/testify/assert" ) // Check it satisfies the interfaces var ( _ Flagger = (*DumpFlags)(nil) _ FlaggerNP = DumpFlags(0) ) func TestDumpFlagsString(t *testing.T) { assert.Equal(t, "", DumpFlags(0).String()) assert.Equal(t, "headers"...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/daemon_other.go
fs/daemon_other.go
// Daemonization stub for non-Unix platforms (common definitions) //go:build windows || plan9 || js package fs // IsDaemon returns true if this process runs in background func IsDaemon() bool { return false }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/newfs.go
fs/newfs.go
// NewFs and its helpers package fs import ( "context" "crypto/md5" "encoding/base64" "fmt" "maps" "os" "path/filepath" "slices" "strings" "sync" "github.com/rclone/rclone/fs/config/configmap" "github.com/rclone/rclone/fs/config/configstruct" "github.com/rclone/rclone/fs/fspath" ) // Store the hashes o...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/countsuffix.go
fs/countsuffix.go
package fs // CountSuffix is parsed by flag with k/M/G decimal suffixes import ( "errors" "fmt" "math" "sort" "strconv" "strings" ) // CountSuffix is an int64 with a friendly way of printing setting type CountSuffix int64 // Common multipliers for SizeSuffix const ( CountSuffixBase CountSuffix = 1 Kilo ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/override_test.go
fs/override_test.go
package fs // Check all optional interfaces satisfied var _ FullObjectInfo = (*OverrideRemote)(nil)
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/parseduration_test.go
fs/parseduration_test.go
package fs import ( "encoding/json" "fmt" "strings" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interfaces var ( _ Flagger = (*Duration)(nil) _ FlaggerNP = Duration(0) ) func TestParseDuration(t *testing.T) { now := time.Date(20...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/tristate.go
fs/tristate.go
package fs import ( "encoding/json" "fmt" "strconv" "strings" ) // Tristate is a boolean that can has the states, true, false and // unset/invalid/nil type Tristate struct { Value bool Valid bool } // String renders the tristate as true/false/unset func (t Tristate) String() string { if !t.Valid { return "u...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/metadata_test.go
fs/metadata_test.go
package fs_test import ( "context" "fmt" "testing" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/object" "github.com/rclone/rclone/fstest/mockfs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestMetadataSet(t *testing.T) { var m fs.Metadata assert.N...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/newfs_test.go
fs/newfs_test.go
package fs_test import ( "context" "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest/mockfs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestNewFs(t *testing.T) { ctx := context.Background() // Register mockfs temporarily oldRegistry := fs.Regist...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config_list.go
fs/config_list.go
package fs import ( "bytes" "encoding/csv" "fmt" ) // CommaSepList is a comma separated config value // It uses the encoding/csv rules for quoting and escaping type CommaSepList []string // SpaceSepList is a space separated config value // It uses the encoding/csv rules for quoting and escaping type SpaceSepList ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/sizesuffix_test.go
fs/sizesuffix_test.go
package fs import ( "encoding/json" "fmt" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interfaces var ( _ Flagger = (*SizeSuffix)(nil) _ FlaggerNP = SizeSuffix(0) ) func TestSizeSuffixString(t *testing.T) { for _, test := range []struct {...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/override.go
fs/override.go
package fs import "context" // OverrideRemote is a wrapper to override the Remote for an // ObjectInfo type OverrideRemote struct { ObjectInfo remote string } // NewOverrideRemote returns an OverrideRemoteObject which will // return the remote specified func NewOverrideRemote(oi ObjectInfo, remote string) *Overrid...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/version.go
fs/version.go
package fs // Version of rclone containing the complete version string var Version string func init() { if Version == "" { if VersionSuffix == "" { Version = VersionTag } else { Version = VersionTag + "-" + VersionSuffix } } }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/direntries.go
fs/direntries.go
package fs import "fmt" // DirEntries is a slice of Object or *Dir type DirEntries []DirEntry // Len is part of sort.Interface. func (ds DirEntries) Len() int { return len(ds) } // Swap is part of sort.Interface. func (ds DirEntries) Swap(i, j int) { ds[i], ds[j] = ds[j], ds[i] } // Less is part of sort.Interfac...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/sizesuffix.go
fs/sizesuffix.go
package fs // SizeSuffix is parsed by flag with K/M/G binary suffixes import ( "encoding/json" "errors" "fmt" "math" "sort" "strconv" "strings" ) // SizeSuffix is an int64 with a friendly way of printing setting type SizeSuffix int64 // Common multipliers for SizeSuffix const ( SizeSuffixBase SizeSuffix = 1 ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/cutoffmode.go
fs/cutoffmode.go
package fs type cutoffModeChoices struct{} func (cutoffModeChoices) Choices() []string { return []string{ CutoffModeHard: "HARD", CutoffModeSoft: "SOFT", CutoffModeCautious: "CAUTIOUS", } } // CutoffMode describes the possible delete modes in the config type CutoffMode = Enum[cutoffModeChoices] // C...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/terminalcolormode_test.go
fs/terminalcolormode_test.go
package fs import ( "encoding/json" "strconv" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestTerminalColorModeString(t *testing.T) { for _, test := range []struct { in TerminalColorMode want string }{ {TerminalColorModeAuto, "AUTO"}, {TerminalColorMod...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/parsetime.go
fs/parsetime.go
package fs import ( "encoding/json" "fmt" "time" ) // Time is a time.Time with some more parsing options type Time time.Time // For overriding in unittests. var ( timeNowFunc = time.Now ) // Turn Time into a string func (t Time) String() string { if !t.IsSet() { return "off" } return time.Time(t).Format(ti...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/enum.go
fs/enum.go
package fs import ( "encoding/json" "fmt" "strings" ) // Enum is an option which can only be one of the Choices. // // Suggested implementation is something like this: // // type choice = Enum[choices] // // const ( // choiceA choice = iota // choiceB // choiceC // ) // // type choices struct{} // // func (choi...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/versionsuffix.go
fs/versionsuffix.go
package fs // VersionSuffix of rclone containing the pre-release label if any var VersionSuffix = "DEV"
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/enum_test.go
fs/enum_test.go
package fs import ( "encoding/json" "fmt" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) type choices struct{} func (choices) Choices() []string { return []string{ choiceA: "A", choiceB: "B", choiceC: "C", } } type choice = Enum[choices] const ( choiceA choice...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/fingerprint_test.go
fs/fingerprint_test.go
package fs_test import ( "context" "fmt" "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/hash" "github.com/rclone/rclone/fstest/mockfs" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestFingerprint(t *testi...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/backend_config_test.go
fs/backend_config_test.go
package fs import ( "fmt" "testing" "github.com/stretchr/testify/assert" ) func TestStatePush(t *testing.T) { assert.Equal(t, "", StatePush("")) assert.Equal(t, "", StatePush("", "")) assert.Equal(t, "a", StatePush("", "a")) assert.Equal(t, "a,1,2,3", StatePush("", "a", "1,2,3")) assert.Equal(t, "potato", S...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/fs.go
fs/fs.go
// Package fs is a generic file system interface for rclone object storage systems package fs import ( "context" "errors" "io" "math" "time" ) // Constants const ( // ModTimeNotSupported is a very large precision value to show // mod time isn't supported on this Fs ModTimeNotSupported = 100 * 365 * 24 * time....
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/direntries_test.go
fs/direntries_test.go
package fs_test import ( "sort" "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest/mockdir" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" ) func TestDirEntriesSort(t *testing.T) { a := mockobject.New("a") aDir := mockdir.New("a") b := mockobject.New(...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/deletemode.go
fs/deletemode.go
package fs // DeleteMode describes the possible delete modes in the config type DeleteMode byte // DeleteMode constants const ( DeleteModeOff DeleteMode = iota DeleteModeBefore DeleteModeDuring DeleteModeAfter DeleteModeOnly DeleteModeDefault = DeleteModeAfter )
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/countsuffix_test.go
fs/countsuffix_test.go
package fs import ( "encoding/json" "fmt" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interfaces var ( _ Flagger = (*CountSuffix)(nil) _ FlaggerNP = CountSuffix(0) ) func TestCountSuffixString(t *testing.T) { for _, test := range []struc...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/configmap.go
fs/configmap.go
// Getters and Setters for ConfigMap package fs import ( "os" "github.com/rclone/rclone/fs/config/configmap" ) // A configmap.Getter to read from the environment RCLONE_CONFIG_backend_option_name type configEnvVars string // Get a config item from the environment variables if possible func (configName configEnvV...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/registry_test.go
fs/registry_test.go
package fs import ( "encoding/json" "fmt" "os" "testing" "github.com/rclone/rclone/fs/config/configmap" "github.com/spf13/pflag" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interface var _ pflag.Value = (*Option)(nil) func TestOption(t *testing.T) {...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/dump.go
fs/dump.go
package fs // DumpFlags describes the Dump options in force type DumpFlags = Bits[dumpChoices] // DumpFlags definitions const ( DumpHeaders DumpFlags = 1 << iota DumpBodies DumpRequests DumpResponses DumpAuth DumpFilters DumpGoRoutines DumpOpenFiles DumpMapper ) type dumpChoices struct{} func (dumpChoices)...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/parseduration.go
fs/parseduration.go
package fs import ( "encoding/json" "fmt" "math" "strconv" "strings" "time" ) // Duration is a time.Duration with some more parsing options type Duration time.Duration // DurationOff is the default value for flags which can be turned off const DurationOff = Duration((1 << 63) - 1) // Turn Duration into a stri...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/dir.go
fs/dir.go
package fs import ( "context" "time" ) // Dir describes an unspecialized directory for directory/container/bucket lists type Dir struct { f Info // Fs this directory is part of remote string // name of the directory modTime time.Time // modification or creation time - IsZero for unknown size i...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/mount_helper_test.go
fs/mount_helper_test.go
package fs import ( "os" "strings" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestMountHelperArgs(t *testing.T) { type testCase struct { src []string dst []string env string err string } normalCases := []testCase{{ src: []string{}, dst: []string{"m...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/override_dir.go
fs/override_dir.go
package fs // OverrideDirectory is a wrapper to override the Remote for an // Directory type OverrideDirectory struct { Directory remote string } // NewOverrideDirectory returns an OverrideDirectoryObject which will // return the remote specified func NewOverrideDirectory(oi Directory, remote string) *OverrideDirec...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/asyncreader/asyncreader.go
fs/asyncreader/asyncreader.go
// Package asyncreader provides an asynchronous reader which reads // independently of write package asyncreader import ( "context" "errors" "io" "sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/lib/pool" "github.com/rclone/rclone/lib/readers" ) const ( // BufferSize is the default size of the ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/asyncreader/asyncreader_test.go
fs/asyncreader/asyncreader_test.go
package asyncreader import ( "bufio" "bytes" "context" "fmt" "io" "math/rand" "strings" "sync" "testing" "testing/iotest" "time" "github.com/rclone/rclone/lib/israce" "github.com/rclone/rclone/lib/readers" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestAsyncReade...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/filter/rules.go
fs/filter/rules.go
package filter import ( "bufio" "fmt" "os" "regexp" "slices" "strings" "github.com/rclone/rclone/fs" ) // RulesOpt is configuration for a rule set type RulesOpt struct { FilterRule []string `config:"filter"` FilterFrom []string `config:"filter_from"` ExcludeRule []string `config:"exclude"` ExcludeFrom [...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/filter/filter.go
fs/filter/filter.go
// Package filter controls the filtering of files package filter import ( "context" "crypto/md5" "encoding/binary" "errors" "fmt" "math/rand/v2" "path" "slices" "strconv" "strings" "time" "github.com/rclone/rclone/fs" "golang.org/x/sync/errgroup" "golang.org/x/text/unicode/norm" ) // This is the global...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/filter/filter_test.go
fs/filter/filter_test.go
package filter import ( "context" "fmt" "os" "strings" "sync" "testing" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestNewFilterDefault(t *testing.T) { f, err := NewFilter(nil) requir...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/filter/glob.go
fs/filter/glob.go
// rsync style glob parser package filter import ( "bytes" "fmt" "regexp" "strings" "github.com/rclone/rclone/fs" ) // GlobPathToRegexp converts an rsync style glob path to a regexp func GlobPathToRegexp(glob string, ignoreCase bool) (*regexp.Regexp, error) { return globToRegexp(glob, true, true, ignoreCase) ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/filter/glob_test.go
fs/filter/glob_test.go
package filter import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestGlobStringToRegexp(t *testing.T) { for _, test := range []struct { in string want string error string }{ {``, ``, ``}, {`potato`, `potato`, ``}, {`potato,sausage`, `potato,saus...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/filter/filterflags/filterflags.go
fs/filter/filterflags/filterflags.go
// Package filterflags implements command line flags to set up a filter package filterflags import ( "github.com/rclone/rclone/fs/config/flags" "github.com/rclone/rclone/fs/filter" "github.com/spf13/pflag" ) // AddFlags adds the non filing system specific flags to the command func AddFlags(flagSet *pflag.FlagSet) ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/logger/logger_test.go
fs/logger/logger_test.go
//go:build !plan9 package logger_test import ( "path/filepath" "testing" "github.com/rclone/rclone/fs/logger" "github.com/rogpeppe/go-internal/testscript" ) // TestMain drives the tests func TestMain(m *testing.M) { // This enables the testscript package. See: // https://bitfieldconsulting.com/golang/cli-test...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/logger/logger.go
fs/logger/logger.go
// Package logger implements testing for the sync (and bisync) logger package logger import ( _ "github.com/rclone/rclone/backend/all" // import all backends "github.com/rclone/rclone/cmd" _ "github.com/rclone/rclone/cmd/all" // import all commands _ "github.com/rclone/rclone/lib/plugin" // import plugins ) //...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/hash/hash.go
fs/hash/hash.go
// Package hash provides hash utilities for Fs. package hash import ( "crypto/md5" "crypto/sha1" "crypto/sha256" "crypto/sha512" "encoding/base64" "encoding/hex" "errors" "fmt" "hash" "hash/crc32" "io" "strings" "github.com/jzelinskie/whirlpool" "github.com/zeebo/blake3" "github.com/zeebo/xxh3" ) // T...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/hash/hash_test.go
fs/hash/hash_test.go
package hash_test import ( "bytes" "fmt" "io" "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/hash" "github.com/spf13/pflag" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interface var _ pflag.Value = (*hash.Type)(nil) func TestH...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/dirtree/dirtree_test.go
fs/dirtree/dirtree_test.go
package dirtree import ( "fmt" "testing" "github.com/rclone/rclone/fstest/mockdir" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestNew(t *testing.T) { dt := New() assert.Equal(t, "", dt.String()) } func TestParentDir(t *testi...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/dirtree/dirtree.go
fs/dirtree/dirtree.go
// Package dirtree contains the DirTree type which is used for // building filesystem hierarchies in memory. package dirtree import ( "bytes" "fmt" "path" "sort" "time" "github.com/rclone/rclone/fs" ) // DirTree is a map of directories to entries type DirTree map[string]fs.DirEntries // New returns a fresh Di...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/cache/cache.go
fs/cache/cache.go
// Package cache implements the Fs cache package cache import ( "context" "runtime" "strings" "sync" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/filter" "github.com/rclone/rclone/lib/cache" ) var ( once sync.Once // creation c *cache.Cache mu sync.M...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/cache/cache_test.go
fs/cache/cache_test.go
package cache import ( "context" "errors" "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest/mockfs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var ( called = 0 errSentinel = errors.New("an error") ) func mockNewFs(t *testing.T) func(ctx context....
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/march/march.go
fs/march/march.go
// Package march traverses two directories in lock step package march import ( "cmp" "context" "fmt" "path" "slices" "strings" "sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/dirtree" "github.com/rclone/rclone/fs/filter" "github.com/rclone/rclone/fs/list" "github.com/rclone/rclone/fs/wal...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/march/march_test.go
fs/march/march_test.go
// Internal tests for march package march import ( "context" "errors" "fmt" "strings" "sync" "testing" _ "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/rclone/rclone/fs/list" "github.com/rclone...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/list/helpers_test.go
fs/list/helpers_test.go
package list import ( "context" "errors" "fmt" "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Mock callback to collect the entries func mockCallback(entries fs.DirEntries) error { // Do noth...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/list/sorter_test.go
fs/list/sorter_test.go
package list import ( "cmp" "context" "fmt" "slices" "strings" "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest/mockdir" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestSorter(t *testing.T) { ctx :=...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/list/list_test.go
fs/list/list_test.go
package list import ( "context" "testing" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest/mockdir" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // NB integration tests for DirSorted are in // fs/operations/list...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/list/sorter.go
fs/list/sorter.go
package list import ( "cmp" "context" "errors" "fmt" "slices" "strings" "sync" "time" "github.com/lanrat/extsort" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/lib/errcount" "golang.org/x/sync/errgroup" ) // NewObjecter is the minimum facilities we need from the fs.Fs passed into NewSorter. typ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/list/list.go
fs/list/list.go
// Package list contains list functions package list import ( "context" "fmt" "sort" "strings" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" "github.com/rclone/rclone/fs/filter" "github.com/rclone/rclone/lib/bucket" ) // DirSorted reads Object and *Dir into entries for the given Fs. ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/list/helpers.go
fs/list/helpers.go
package list import ( "context" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" ) // Listing helpers used by backends // Helper is used in the implementation of ListR to accumulate DirEntries type Helper struct { callback fs.ListRCallback entries fs.DirEntries } // NewHelper should be ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/walk/walk.go
fs/walk/walk.go
// Package walk walks directories package walk import ( "context" "errors" "fmt" "path" "sort" "strings" "sync" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" "github.com/rclone/rclone/fs/dirtree" "github.com/rclone/rclone/fs/filter" "github.com/rclone/rclone/fs/list" ) //...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/walk/walk_test.go
fs/walk/walk_test.go
package walk import ( "context" "errors" "fmt" "io" "strings" "sync" "testing" "github.com/rclone/rclone/fs" _ "github.com/rclone/rclone/fs/accounting" "github.com/rclone/rclone/fs/filter" "github.com/rclone/rclone/fs/fserrors" "github.com/rclone/rclone/fstest/mockdir" "github.com/rclone/rclone/fstest/mo...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/chunkedreader/chunkedreader_test.go
fs/chunkedreader/chunkedreader_test.go
package chunkedreader import ( "context" "fmt" "io" "math/rand" "testing" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // TestMain drives the tests func TestMain(m *testing.M) { fstest.TestMain(m)...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false