MCPcopy
hub / github.com/rclone/rclone / newFsDir

Function newFsDir

cmd/cmd.go:143–152  ·  view source on GitHub ↗

newFsDir creates an Fs from a name This must point to a directory

(remote string)

Source from the content-addressed store, hash-verified

141//
142// This must point to a directory
143func newFsDir(remote string) fs.Fs {
144 ctx := context.Background()
145 f, err := cache.Get(ctx, remote)
146 if err != nil {
147 err = fs.CountError(ctx, err)
148 fs.Fatalf(nil, "Failed to create file system for %q: %v", remote, err)
149 }
150 cache.Pin(f) // pin indefinitely since it was on the CLI
151 return f
152}
153
154// NewFsDir creates a new Fs from the arguments
155//

Callers 4

NewFsDirFunction · 0.85
NewFsSrcDstFunction · 0.85
NewFsSrcFileDstFunction · 0.85
NewFsDstFileFunction · 0.85

Calls 3

GetFunction · 0.92
FatalfFunction · 0.92
PinFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…