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/fs/config/configstruct/configstruct_test.go
fs/config/configstruct/configstruct_test.go
package configstruct_test import ( "fmt" "testing" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config/configstruct" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) type Conf struct { A string B string } type Conf2 struct { PotatoPie string `config:"s...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/configstruct/internal_test.go
fs/config/configstruct/internal_test.go
package configstruct import ( "testing" "github.com/stretchr/testify/assert" ) func TestCamelToSnake(t *testing.T) { for _, test := range []struct { in string want string }{ {"", ""}, {"Type", "type"}, {"AuthVersion", "auth_version"}, {"AccessKeyID", "access_key_id"}, } { got := camelToSnake(tes...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/flags/flags.go
fs/config/flags/flags.go
// Package flags contains enhanced versions of spf13/pflag flag // routines which will read from the environment also. package flags import ( "os" "regexp" "strings" "time" "github.com/rclone/rclone/fs" "github.com/spf13/pflag" ) // Groups of Flags type Groups struct { // Groups of flags Groups []*Group //...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/configflags/configflags.go
fs/config/configflags/configflags.go
// Package configflags defines the flags used by rclone. It is // decoupled into a separate package so it can be replaced. package configflags // Options set by command line flags import ( "context" "net" "os" "strconv" "strings" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config" "github.com/...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/configfile/configfile.go
fs/config/configfile/configfile.go
// Package configfile implements a config file loader and saver package configfile import ( "bytes" "fmt" "os" "path/filepath" "strings" "sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config" "github.com/rclone/rclone/lib/file" "github.com/unknwon/goconfig" //nolint:misspell // Don't incl...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/configfile/configfile_other.go
fs/config/configfile/configfile_other.go
// Read, write and edit the config file // Non-unix specific functions. //go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris package configfile // attemptCopyGroup tries to keep the group the same, which only makes sense // for system with user-group-world permission model. func ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/configfile/configfile_unix.go
fs/config/configfile/configfile_unix.go
// Read, write and edit the config file // Unix specific functions. //go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris package configfile import ( "os" "os/user" "strconv" "syscall" "github.com/rclone/rclone/fs" ) // attemptCopyGroup tries to keep the group the same. User will ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/configfile/configfile_test.go
fs/config/configfile/configfile_test.go
package configfile import ( "fmt" "io" "os" "path/filepath" "runtime" "strings" "testing" "github.com/rclone/rclone/fs/config" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var configData = `[one] type = number1 fruit = potato [two] type = number2 fruit = apple topping = nut...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/configmap/configmap_test.go
fs/config/configmap/configmap_test.go
package configmap import ( "encoding/base64" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var ( _ Mapper = Simple(nil) _ Getter = Simple(nil) _ Setter = Simple(nil) ) func TestConfigMapGet(t *testing.T) { m := New() value, found := m.Get("config1") assert.Equal(t...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/configmap/configmap_external_test.go
fs/config/configmap/configmap_external_test.go
package configmap_test import ( "fmt" "testing" "github.com/rclone/rclone/fs/config/configmap" "github.com/rclone/rclone/fs/fspath" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestSimpleString(t *testing.T) { for _, tt := range []struct { name string want string in ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/configmap/configmap.go
fs/config/configmap/configmap.go
// Package configmap provides an abstraction for reading and writing config package configmap import ( "encoding/base64" "encoding/json" "fmt" "sort" "strings" "unicode" ) // Priority of getters type Priority int8 // Priority levels for AddGetter const ( PriorityNormal Priority = iota PriorityConfig ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/obscure/obscure_test.go
fs/config/obscure/obscure_test.go
package obscure import ( "bytes" "crypto/rand" "testing" "github.com/stretchr/testify/assert" ) func TestObscure(t *testing.T) { for _, test := range []struct { in string want string iv string }{ {"", "YWFhYWFhYWFhYWFhYWFhYQ", "aaaaaaaaaaaaaaaa"}, {"potato", "YWFhYWFhYWFhYWFhYWFhYXMaGgIlEQ", "aaa...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/config/obscure/obscure.go
fs/config/obscure/obscure.go
// Package obscure contains the Obscure and Reveal commands package obscure import ( "crypto/aes" "crypto/cipher" "crypto/rand" "encoding/base64" "errors" "fmt" "io" "math" "github.com/rclone/rclone/fs" ) // crypt internals var ( cryptKey = []byte{ 0x9c, 0x93, 0x5b, 0x48, 0x73, 0x0a, 0x55, 0x4d, 0x6b, ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/systemd.go
fs/log/systemd.go
// Systemd interface for non-Unix variants only //go:build !unix package log import ( "runtime" "github.com/rclone/rclone/fs" ) // Enables systemd logs if configured or if auto-detected func startSystemdLog(handler *OutputHandler) bool { fs.Fatalf(nil, "--log-systemd not supported on %s platform", runtime.GOOS)...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/syslog.go
fs/log/syslog.go
// Syslog interface for non-Unix variants only //go:build windows || nacl || plan9 package log import ( "runtime" "github.com/rclone/rclone/fs" ) // Starts syslog if configured, returns true if it was started func startSysLog(handler *OutputHandler) bool { fs.Fatalf(nil, "--syslog not supported on %s platform",...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/log.go
fs/log/log.go
// Package log provides logging for rclone package log import ( "context" "fmt" "io" "os" "reflect" "runtime" "strings" "time" "github.com/rclone/rclone/fs" "gopkg.in/natefinch/lumberjack.v2" ) // OptionsInfo descripts the Options in use var OptionsInfo = fs.Options{{ Name: "log_file", Default: "", H...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/syslog_unix.go
fs/log/syslog_unix.go
// Syslog interface for Unix variants only //go:build !windows && !nacl && !plan9 package log import ( "log/slog" "log/syslog" "os" "path" "github.com/rclone/rclone/fs" ) var ( syslogFacilityMap = map[string]syslog.Priority{ "KERN": syslog.LOG_KERN, "USER": syslog.LOG_USER, "MAIL": syslog.L...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/event_log_windows.go
fs/log/event_log_windows.go
// Windows event logging //go:build windows package log import ( "fmt" "log/slog" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/lib/atexit" "golang.org/x/sys/windows" "golang.org/x/sys/windows/svc/eventlog" ) const ( errorID = uint32(windows.ERROR_INTERNAL_ERROR) infoID = uint32(windows.ER...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/slog_test.go
fs/log/slog_test.go
package log import ( "bytes" "context" "fmt" "os" "regexp" "strings" "testing" "time" "log/slog" "github.com/rclone/rclone/fs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var ( utcPlusOne = time.FixedZone("UTC+1", 1*60*60) t0 = time.Date(2020, 1, 2, 3, 4, 5, 12...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/systemd_unix.go
fs/log/systemd_unix.go
// Systemd interface for Unix variants only //go:build unix package log import ( "log/slog" "github.com/coreos/go-systemd/v22/journal" "github.com/rclone/rclone/fs" ) // Enables systemd logs if configured or if auto-detected func startSystemdLog(handler *OutputHandler) bool { handler.clearFormatFlags(logFormat...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/redirect_stderr_windows.go
fs/log/redirect_stderr_windows.go
// Log the panic under windows to the log file // // Code from minix, via // // https://play.golang.org/p/kLtct7lSUg //go:build windows package log import ( "os" "syscall" "github.com/rclone/rclone/fs" ) var ( kernel32 = syscall.MustLoadDLL("kernel32.dll") procSetStdHandle = kernel32.MustFindProc("Set...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/slog.go
fs/log/slog.go
// Interfaces for the slog package package log import ( "bytes" "context" "fmt" "io" "log/slog" "os" "runtime" "strings" "sync" "time" "github.com/rclone/rclone/fs" ) // Handler is the standard handler for the logging. var Handler = defaultHandler() // Create the default OutputHandler // // This logs to...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/redirect_stderr_unix.go
fs/log/redirect_stderr_unix.go
// Log the panic under unix to the log file //go:build !windows && !solaris && !plan9 && !js package log import ( "os" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config" "golang.org/x/sys/unix" ) // redirectStderr to the file passed in func redirectStderr(f *os.File) { passPromptFd, err := uni...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/event_log.go
fs/log/event_log.go
// Windows event logging stubs for non windows machines //go:build !windows package log import ( "fmt" "runtime" ) // Starts windows event log if configured. func startWindowsEventLog(*OutputHandler) error { return fmt.Errorf("windows event log not supported on %s platform", runtime.GOOS) }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/redirect_stderr.go
fs/log/redirect_stderr.go
// Log the panic to the log file - for oses which can't do this //go:build !windows && !darwin && !dragonfly && !freebsd && !linux && !nacl && !netbsd && !openbsd && !aix package log import ( "os" "github.com/rclone/rclone/fs" ) // redirectStderr to the file passed in func redirectStderr(f *os.File) { fs.Errorf...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/log/logflags/logflags.go
fs/log/logflags/logflags.go
// Package logflags implements command line flags to set up the log package logflags import ( "github.com/rclone/rclone/fs/config/flags" "github.com/rclone/rclone/fs/log" "github.com/spf13/pflag" ) // AddFlags adds the log flags to the flagSet func AddFlags(flagSet *pflag.FlagSet) { flags.AddFlagsFromOptions(flag...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/driveletter/driveletter.go
fs/driveletter/driveletter.go
//go:build !windows // Package driveletter returns whether a name is a valid drive letter package driveletter // IsDriveLetter returns a bool indicating whether name is a valid // Windows drive letter // // On non windows platforms we don't have drive letters so we always // return false func IsDriveLetter(name strin...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/driveletter/driveletter_windows.go
fs/driveletter/driveletter_windows.go
//go:build windows // Package driveletter returns whether a name is a valid drive letter package driveletter // IsDriveLetter returns a bool indicating whether name is a valid // Windows drive letter func IsDriveLetter(name string) bool { if len(name) != 1 { return false } c := name[0] return (c >= 'a' && c <= ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/sync/sync_test.go
fs/sync/sync_test.go
// Test sync/copy/move package sync import ( "bytes" "context" "errors" "fmt" "io" "os" "os/exec" "runtime" "sort" "strings" "testing" "time" mutex "sync" // renamed as "sync" already in use _ "github.com/rclone/rclone/backend/all" // import all backends "github.com/rclone/rclone/cmd/bisync/bilib" "...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
true
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/sync/rc.go
fs/sync/rc.go
package sync import ( "context" "github.com/rclone/rclone/fs/rc" ) func init() { for _, name := range []string{"sync", "copy", "move"} { moveHelp := "" if name == "move" { moveHelp = "- deleteEmptySrcDirs - delete empty src directories if set\n" } rc.Add(rc.Call{ Path: "sync/" + name, Aut...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/sync/sync_transform_test.go
fs/sync/sync_transform_test.go
// Test transform package sync import ( "cmp" "context" "fmt" "path" "slices" "strings" "testing" _ "github.com/rclone/rclone/backend/all" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" "github.com/rclone/rclone/fs/filter" "github.com/rclone/rclone/fs/operations" "github.com/rclo...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/sync/sync.go
fs/sync/sync.go
// Package sync is the implementation of sync/copy/move package sync import ( "context" "errors" "fmt" "path" "slices" "sort" "strings" "sync" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" "github.com/rclone/rclone/fs/filter" "github.com/rclone/rclone/fs/fserrors" "github...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
true
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/sync/pipe_test.go
fs/sync/pipe_test.go
package sync import ( "container/heap" "context" "sync" "sync/atomic" "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest/mockobject" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check interface satisfied var _ heap.Interface = (*pipe)(nil) func TestP...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/sync/rc_test.go
fs/sync/rc_test.go
package sync import ( "context" "testing" "github.com/rclone/rclone/fs/cache" "github.com/rclone/rclone/fs/rc" "github.com/rclone/rclone/fstest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func rcNewRun(t *testing.T, method string) (*fstest.Run, *rc.Call) { if *fstest.RemoteN...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/fs/sync/pipe.go
fs/sync/pipe.go
package sync import ( "context" "fmt" "math/bits" "strconv" "strings" "sync" "github.com/aalpar/deheap" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/fserrors" ) // compare two items for order by type lessFn func(a, b fs.ObjectPair) bool // pipe provides an unbounded channel like experience //...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/open_test.go
vfs/open_test.go
// Code generated by make_open_tests.go - use go generate to rebuild - DO NOT EDIT package vfs import ( "io" "os" ) // openTest describes a test of OpenFile type openTest struct { flags int what string openNonExistentErr error readNonExistentErr error writeNonExistentErr error ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
true
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/rc.go
vfs/rc.go
package vfs import ( "context" "errors" "fmt" "strconv" "strings" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/cache" "github.com/rclone/rclone/fs/rc" "github.com/rclone/rclone/vfs/vfscache/writeback" ) const getVFSHelp = ` This command takes an "fs" parameter. If this parameter is no...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/read_test.go
vfs/read_test.go
package vfs import ( "context" "io" "os" "testing" "github.com/rclone/rclone/fstest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Open a file for write func readHandleCreate(t *testing.T) (r *fstest.Run, vfs *VFS, fh *ReadFileHandle) { r, vfs = newTestVFS(t) file1 := r.Wr...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/file.go
vfs/file.go
package vfs import ( "context" "errors" "fmt" "io" "os" "path" "strings" "sync" "sync/atomic" "time" "slices" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/log" "github.com/rclone/rclone/fs/operations" "github.com/rclone/rclone/vfs/vfscommon" ) // The File object is tightly coupled to th...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/errors_test.go
vfs/errors_test.go
package vfs import ( "testing" "github.com/stretchr/testify/assert" ) func TestErrorError(t *testing.T) { assert.Equal(t, "Success", OK.Error()) assert.Equal(t, "Function not implemented", ENOSYS.Error()) assert.Equal(t, "Low level error 99", Error(99).Error()) }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/dir_handle.go
vfs/dir_handle.go
package vfs import ( "io" "os" ) // DirHandle represents an open directory type DirHandle struct { baseHandle d *Dir fis []os.FileInfo // where Readdir got to } // newDirHandle opens a directory for read func newDirHandle(d *Dir) *DirHandle { return &DirHandle{ d: d, } } // String converts it to printabl...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/dir_test.go
vfs/dir_test.go
package vfs import ( "context" "encoding/json" "fmt" "os" "runtime" "slices" "sort" "testing" "time" "unsafe" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/operations" "github.com/rclone/rclone/fstest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func dirCr...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/zip_test.go
vfs/zip_test.go
package vfs import ( "archive/zip" "bytes" "context" "crypto/sha256" "fmt" "io" "strings" "testing" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/lib/random" "github.com/stretchr/testify/require" ) func readZip(t *testing.T, buf *bytes.Buffer) *zip.Reader { t.Helper() r, err := zip.NewRead...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfs_test.go
vfs/vfs_test.go
// Test suite for vfs package vfs import ( "context" "errors" "fmt" "io" "os" "testing" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/vfs/vfscommon" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Some times used in the t...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/errors.go
vfs/errors.go
// Cross platform errors package vfs import ( "fmt" "os" ) // Error describes low level errors in a cross platform way. type Error byte // NB if changing errors, update translateError in cmd/mount/fs.go, cmd/cmount/fs.go, cmd/mount2/fs.go // Low level errors const ( OK Error = iota ENOTEMPTY ESPIPE EBADF ER...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/write_test.go
vfs/write_test.go
package vfs import ( "context" "errors" "io" "os" "runtime" "sync" "testing" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/lib/random" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Open a file for write func writeHandle...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/read_write_test.go
vfs/read_write_test.go
package vfs import ( "context" "errors" "fmt" "io" "os" "testing" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/operations" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/vfs/vfscommon" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/zip.go
vfs/zip.go
package vfs import ( "archive/zip" "context" "fmt" "io" "os" "github.com/rclone/rclone/fs" ) // CreateZip creates a zip file from a vfs.Dir writing it to w func CreateZip(ctx context.Context, dir *Dir, w io.Writer) (err error) { zipWriter := zip.NewWriter(w) defer fs.CheckClose(zipWriter, &err) var walk fun...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/file_test.go
vfs/file_test.go
package vfs import ( "context" "fmt" "io" "os" "testing" "unsafe" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/operations" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/fstest/mockfs" "github.com/rclone/rclone/fstest/mockobject" "github.com/rclone/rclone/vfs/vfscommon" "github...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfs.go
vfs/vfs.go
// Package vfs provides a virtual filing system layer over rclone's // native objects. // // It attempts to behave in a similar way to Go's filing system // manipulation code in the os package. The same named function // should behave in an identical fashion. The objects also obey Go's // standard interfaces. // // N...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/read_write.go
vfs/read_write.go
package vfs import ( "fmt" "io" "os" "sync" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/log" "github.com/rclone/rclone/vfs/vfscache" ) // RWFileHandle is a handle that can be open for read and write. // // It will be open to a temporary file which, when closed, will be // transferred to the rem...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/sighup.go
vfs/sighup.go
//go:build !plan9 && !js package vfs import ( "os" "os/signal" "syscall" ) // NotifyOnSigHup makes SIGHUP notify given channel on supported systems func NotifyOnSigHup(sighupChan chan os.Signal) { signal.Notify(sighupChan, syscall.SIGHUP) }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vstate_string.go
vfs/vstate_string.go
// Code generated by "stringer -type=vState"; DO NOT EDIT. package vfs import "strconv" func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. var x [1]struct{} _ = x[vOK-0] _ = x[vAddFile-1] _ = x[vAddDir-2]...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/make_open_tests.go
vfs/make_open_tests.go
// This makes the open test suite. It tries to open a file (existing // or not existing) with all possible file modes and writes a test // matrix. // // The behaviour is as run on Linux, with the small modification that // O_TRUNC with O_RDONLY does **not** truncate the file. // // Run with go generate (defined in vfs....
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfs_case_test.go
vfs/vfs_case_test.go
package vfs import ( "context" "os" "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/vfs/vfscommon" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/text/unicode/norm" ) func TestCaseSensitivity(t *testing.T) { r := ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/write.go
vfs/write.go
package vfs import ( "context" "io" "os" "sync" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/operations" ) // WriteFileHandle is an open for write handle on a File type WriteFileHandle struct { baseHandle mu sync.Mutex cond sync.Cond // cond lock for out of sequence wri...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/read.go
vfs/read.go
package vfs import ( "context" "errors" "fmt" "io" "os" "sync" "sync/atomic" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" "github.com/rclone/rclone/fs/chunkedreader" "github.com/rclone/rclone/fs/hash" ) // ReadFileHandle is an open for read file handle on a File type Read...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/dir_handle_test.go
vfs/dir_handle_test.go
package vfs import ( "context" "io" "os" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestDirHandleMethods(t *testing.T) { _, _, dir, _ := dirCreate(t) h, err := dir.Open(os.O_RDONLY) require.NoError(t, err) fh, ok := h.(*DirHandle) assert.True(t, ok) // S...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/sighup_unsupported.go
vfs/sighup_unsupported.go
//go:build plan9 || js package vfs import ( "os" ) // NotifyOnSigHup makes SIGHUP notify given channel on supported systems func NotifyOnSigHup(sighupChan chan os.Signal) {}
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest_test.go
vfs/vfstest_test.go
// Run the more functional vfstest package on the vfs package vfs_test import ( "testing" _ "github.com/rclone/rclone/backend/all" // import all the backends "github.com/rclone/rclone/cmd/mountlib" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/vfs" "github.com/rclone/rclone/vfs/vfscommon" "githu...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/rc_test.go
vfs/rc_test.go
package vfs import ( "context" "testing" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/rc" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/vfs/vfscommon" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func rcNewRun(t *testing.T, method string) (r *fstest...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/dir.go
vfs/dir.go
package vfs import ( "context" "encoding/json" "fmt" "os" "path" "sort" "strings" "sync" "sync/atomic" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/dirtree" "github.com/rclone/rclone/fs/list" "github.com/rclone/rclone/fs/log" "github.com/rclone/rclone/fs/object" "github.com/rclone...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
true
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfsflags/vfsflags.go
vfs/vfsflags/vfsflags.go
// Package vfsflags implements command line flags to set up a vfs package vfsflags import ( "github.com/rclone/rclone/fs/config/flags" "github.com/rclone/rclone/vfs/vfscommon" "github.com/spf13/pflag" ) // AddFlags adds the non filing system specific flags to the command func AddFlags(flagSet *pflag.FlagSet) { fl...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/test_vfs/test_vfs.go
vfs/test_vfs/test_vfs.go
// Test the VFS to exhaustion, specifically looking for deadlocks // // Run on a mounted filesystem package main import ( "flag" "fmt" "io" "math" "math/rand" "os" "path" "sync" "sync/atomic" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/lib/file" "github.com/rclone/rclone/lib/random" ) ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscache/item_test.go
vfs/vfscache/item_test.go
package vfscache // FIXME need to test async writeback here import ( "context" "fmt" "io" "math/rand" "os" "sync" "testing" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/lib/random" "github.com/rclone/rclone/lib/readers" "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/vfs/vfscache/cache.go
vfs/vfscache/cache.go
// Package vfscache deals with caching of files locally for the VFS layer package vfscache import ( "context" "errors" "fmt" "os" "path" "path/filepath" "runtime" "sort" "strings" "sync" "time" "github.com/rclone/rclone/fs" fscache "github.com/rclone/rclone/fs/cache" "github.com/rclone/rclone/fs/config"...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscache/cache_test.go
vfs/vfscache/cache_test.go
package vfscache import ( "context" "fmt" "os" "path/filepath" "sort" "testing" "time" _ "github.com/rclone/rclone/backend/local" // import the local backend "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/config" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/lib/diskusage" "gith...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscache/item.go
vfs/vfscache/item.go
package vfscache import ( "context" "encoding/json" "errors" "fmt" "io" "os" "sync" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/fserrors" "github.com/rclone/rclone/fs/operations" "github.com/rclone/rclone/lib/file" "github.com/rclone/rclone/lib/ranges" "github.com/rclone/rclone/vfs...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
true
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscache/downloaders/downloaders_test.go
vfs/vfscache/downloaders/downloaders_test.go
package downloaders import ( "context" "io" "sync" "testing" "time" _ "github.com/rclone/rclone/backend/local" "github.com/rclone/rclone/fs/operations" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/lib/ranges" "github.com/rclone/rclone/lib/readers" "github.com/rclone/rclone/vfs/vfscommon" "g...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscache/downloaders/downloaders.go
vfs/vfscache/downloaders/downloaders.go
// Package downloaders provides utilities for the VFS layer package downloaders import ( "context" "errors" "fmt" "sync" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/accounting" "github.com/rclone/rclone/fs/asyncreader" "github.com/rclone/rclone/fs/chunkedreader" "github.com/rclone/rclo...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscache/writeback/writeback.go
vfs/vfscache/writeback/writeback.go
// Package writeback keeps track of the files which need to be written // back to storage package writeback import ( "container/heap" "context" "errors" "sort" "sync" "sync/atomic" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/vfs/vfscommon" ) const ( maxUploadDelay = 5 * time.Minute // ma...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscache/writeback/writeback_test.go
vfs/vfscache/writeback/writeback_test.go
package writeback import ( "container/heap" "context" "errors" "fmt" "strings" "sync" "testing" "time" "slices" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/vfs/vfscommon" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func newTestWriteBack(t *testing.T) (wb *Wr...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/write_other.go
vfs/vfstest/write_other.go
//go:build !linux && !darwin && !freebsd && !windows package vfstest import ( "errors" "runtime" "testing" ) // TestWriteFileDoubleClose tests double close on write func TestWriteFileDoubleClose(t *testing.T) { t.Skip("not supported on " + runtime.GOOS) } // writeTestDup performs the platform-specific implement...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/file.go
vfs/vfstest/file.go
package vfstest import ( "os" "runtime" "testing" "time" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/vfs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // TestFileModTime tests mod times on files func TestFileModTime(t *testing.T) { run.skipIfNoFUSE(t) run.create...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/read_unix.go
vfs/vfstest/read_unix.go
//go:build linux || darwin || freebsd package vfstest import ( "syscall" "testing" "github.com/stretchr/testify/assert" ) // TestReadFileDoubleClose tests double close on read func TestReadFileDoubleClose(t *testing.T) { run.skipIfVFS(t) run.skipIfNoFUSE(t) run.createFile(t, "testdoubleclose", "hello") in,...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/submount.go
vfs/vfstest/submount.go
package vfstest import ( "bufio" "context" "encoding/json" "flag" "fmt" "io" "os" "os/exec" "runtime" "strings" "time" "github.com/rclone/rclone/cmd/mountlib" "github.com/rclone/rclone/fs" "github.com/rclone/rclone/fs/cache" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/lib/file" "githu...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/read_non_unix.go
vfs/vfstest/read_non_unix.go
//go:build !linux && !darwin && !freebsd package vfstest import ( "runtime" "testing" ) // TestReadFileDoubleClose tests double close on read func TestReadFileDoubleClose(t *testing.T) { t.Skip("not supported on " + runtime.GOOS) }
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/write_windows.go
vfs/vfstest/write_windows.go
//go:build windows package vfstest import ( "runtime" "testing" "golang.org/x/sys/windows" ) // TestWriteFileDoubleClose tests double close on write func TestWriteFileDoubleClose(t *testing.T) { t.Skip("not supported on " + runtime.GOOS) } // writeTestDup performs the platform-specific implementation of the du...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/vfs.go
vfs/vfstest/vfs.go
// Package vfstest provides tests for VFS. package vfstest import ( "os" "github.com/rclone/rclone/vfs" ) // vfsOs is an implementation of Oser backed by the "vfs" package type vfsOs struct { *vfs.VFS } // Stat func (v vfsOs) Stat(path string) (os.FileInfo, error) { return v.VFS.Stat(path) } // Check interface...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/write.go
vfs/vfstest/write.go
package vfstest import ( "os" "runtime" "testing" "github.com/rclone/rclone/vfs/vfscommon" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // TestWriteFileNoWrite tests writing a file with no write()'s to it func TestWriteFileNoWrite(t *testing.T) { run.skipIfNoFUSE(t) fd, err :...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/read.go
vfs/vfstest/read.go
package vfstest import ( "io" "testing" "github.com/stretchr/testify/assert" ) // TestReadByByte reads by byte including don't read any bytes func TestReadByByte(t *testing.T) { run.skipIfNoFUSE(t) var data = []byte("hellohello") run.createFile(t, "testfile", string(data)) run.checkDir(t, "testfile 10") fo...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/write_unix.go
vfs/vfstest/write_unix.go
//go:build linux || darwin || freebsd package vfstest import ( "runtime" "testing" "github.com/rclone/rclone/vfs/vfscommon" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/sys/unix" ) // TestWriteFileDoubleClose tests double close on write func TestWriteFileDoubleClose...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/os.go
vfs/vfstest/os.go
package vfstest import ( "os" "time" "github.com/rclone/rclone/lib/file" "github.com/rclone/rclone/vfs" ) // Oser defines the things that the "os" package can do // // This covers what the VFS can do also type Oser interface { Chtimes(name string, atime time.Time, mtime time.Time) error Create(name string) (vf...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/fs.go
vfs/vfstest/fs.go
// Test suite for rclonefs package vfstest import ( "bufio" "context" "flag" "fmt" "io" "os" "os/exec" "path" "path/filepath" "reflect" "runtime" "strings" "sync" "testing" "time" _ "github.com/rclone/rclone/backend/all" // import all the backends "github.com/rclone/rclone/cmd/mountlib" "github.com...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/edge_cases.go
vfs/vfstest/edge_cases.go
package vfstest import ( "runtime" "testing" "github.com/stretchr/testify/require" ) // TestTouchAndDelete checks that writing a zero byte file and immediately // deleting it is not racy. See https://github.com/rclone/rclone/issues/1181 func TestTouchAndDelete(t *testing.T) { run.skipIfNoFUSE(t) run.checkDir(t,...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfstest/dir.go
vfs/vfstest/dir.go
package vfstest import ( "context" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // TestDirLs checks out listing func TestDirLs(t *testing.T) { run.skipIfNoFUSE(t) run.checkDir(t, "") run.mkdir(t, "a directory") run.createFile(t, "a file", "hello") run.che...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscommon/cachemode_test.go
vfs/vfscommon/cachemode_test.go
package vfscommon import ( "encoding/json" "strconv" "testing" "github.com/spf13/pflag" "github.com/stretchr/testify/assert" ) // Check CacheMode it satisfies the pflag interface var _ pflag.Value = (*CacheMode)(nil) // Check CacheMode it satisfies the json.Unmarshaller interface var _ json.Unmarshaler = (*Cac...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscommon/cachemode.go
vfs/vfscommon/cachemode.go
// Package vfscommon provides utilities for VFS. package vfscommon import ( "github.com/rclone/rclone/fs" ) type cacheModeChoices struct{} func (cacheModeChoices) Choices() []string { return []string{ CacheModeOff: "off", CacheModeMinimal: "minimal", CacheModeWrites: "writes", CacheModeFull: "full"...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscommon/path.go
vfs/vfscommon/path.go
package vfscommon import ( "path" "path/filepath" ) // OSFindParent returns the parent directory of name, or "" for the // root for OS native paths. func OSFindParent(name string) string { parent := filepath.Dir(name) if parent == "." || (len(parent) == 1 && parent[0] == filepath.Separator) { parent = "" } re...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscommon/vfsflags_unix.go
vfs/vfscommon/vfsflags_unix.go
//go:build linux || darwin || freebsd package vfscommon import ( "golang.org/x/sys/unix" ) // get the current umask func getUmask() int { umask := unix.Umask(0) // read the umask unix.Umask(umask) // set it back to what it was return umask } // get the current uid func getUID() uint32 { return uint32(unix...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscommon/filemode.go
vfs/vfscommon/filemode.go
package vfscommon import ( "fmt" "os" "strconv" "github.com/rclone/rclone/fs" ) // FileMode is a command line friendly os.FileMode type FileMode os.FileMode // String turns FileMode into a string func (x FileMode) String() string { return fmt.Sprintf("%03o", x) } // Set a FileMode func (x *FileMode) Set(s str...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscommon/filemode_test.go
vfs/vfscommon/filemode_test.go
package vfscommon import ( "encoding/json" "testing" "github.com/rclone/rclone/fs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // Check it satisfies the interfaces var ( _ fs.Flagger = (*FileMode)(nil) _ fs.FlaggerNP = FileMode(0) ) func TestFileModeString(t *testing.T) { ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscommon/options.go
vfs/vfscommon/options.go
package vfscommon import ( "context" "os" "runtime" "time" "github.com/rclone/rclone/fs" ) // OptionsInfo describes the Options in use var OptionsInfo = fs.Options{{ Name: "no_modtime", Default: false, Help: "Don't read/write the modification time (can speed things up)", Groups: "VFS", }, { Name: ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/vfs/vfscommon/vfsflags_non_unix.go
vfs/vfscommon/vfsflags_non_unix.go
//go:build !linux && !darwin && !freebsd package vfscommon // get the current umask func getUmask() int { return 0000 } // get the current uid func getUID() uint32 { return ^uint32(0) // these values instruct WinFSP-FUSE to use the current user } // get the current gid func getGID() uint32 { return ^uint32(0) //...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmdtest/cmdtest.go
cmdtest/cmdtest.go
// Package cmdtest creates a testable interface to rclone main // // The interface is used to perform end-to-end test of // commands, flags, environment variables etc. package cmdtest // The rest of this file is a 1:1 copy from rclone.go import ( _ "github.com/rclone/rclone/backend/all" // import all backends "gith...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmdtest/environment_test.go
cmdtest/environment_test.go
// environment_test tests the use and precedence of environment variables // // The tests rely on functions defined in cmdtest_test.go package cmdtest import ( "os" "regexp" "runtime" "strings" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // TestEnvironmentVariables ...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
rclone/rclone
https://github.com/rclone/rclone/blob/5f4e4b1a200708f5f36999a9d289823b742e4fd3/cmdtest/cmdtest_test.go
cmdtest/cmdtest_test.go
// cmdtest_test creates a testable interface to rclone main // // The interface is used to perform end-to-end test of // commands, flags, environment variables etc. package cmdtest import ( "os" "os/exec" "path/filepath" "strings" "testing" "github.com/rclone/rclone/fs" "github.com/stretchr/testify/assert" "...
go
MIT
5f4e4b1a200708f5f36999a9d289823b742e4fd3
2026-01-07T08:35:43.525317Z
false
restic/restic
https://github.com/restic/restic/blob/9e2d60e28c662ee6e3a3d4f19e9f2d560abf9a59/build.go
build.go
// Description // // This program aims to make building Go programs for end users easier by just // calling it with `go run`, without having to setup a GOPATH. // // This program checks for a minimum Go version. It will use Go modules for // compilation. It builds the package configured as Main in the Config struct. /...
go
BSD-2-Clause
9e2d60e28c662ee6e3a3d4f19e9f2d560abf9a59
2026-01-07T08:36:32.238827Z
false
restic/restic
https://github.com/restic/restic/blob/9e2d60e28c662ee6e3a3d4f19e9f2d560abf9a59/doc.go
doc.go
// Package restic gives a (very brief) introduction to the structure of source code. // // # Overview // // The packages are structured so that cmd/ contains the main package for the // restic binary, and internal/ contains almost all code in library form. We've // chosen to use the internal/ path so that the packages ...
go
BSD-2-Clause
9e2d60e28c662ee6e3a3d4f19e9f2d560abf9a59
2026-01-07T08:36:32.238827Z
false
restic/restic
https://github.com/restic/restic/blob/9e2d60e28c662ee6e3a3d4f19e9f2d560abf9a59/cmd/restic/cleanup.go
cmd/restic/cleanup.go
package main import ( "context" "fmt" "io" "os" "os/signal" "syscall" "github.com/restic/restic/internal/debug" ) func createGlobalContext(stderr io.Writer) context.Context { ctx, cancel := context.WithCancel(context.Background()) ch := make(chan os.Signal, 1) go cleanupHandler(ch, cancel, stderr) signal...
go
BSD-2-Clause
9e2d60e28c662ee6e3a3d4f19e9f2d560abf9a59
2026-01-07T08:36:32.238827Z
false