MCPcopy
hub / github.com/rclone/rclone / TestRecursiveTouchDirWithFiles

Function TestRecursiveTouchDirWithFiles

cmd/touch/touch_test.go:139–152  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

137}
138
139func TestRecursiveTouchDirWithFiles(t *testing.T) {
140 r := fstest.NewRun(t)
141
142 err := r.Fremote.Mkdir(context.Background(), "a/b/c")
143 require.NoError(t, err)
144 file1 := r.WriteObject(context.Background(), "a/f1", "111", t1)
145 file2 := r.WriteObject(context.Background(), "a/b/f2", "222", t1)
146 file3 := r.WriteObject(context.Background(), "a/b/c/f3", "333", t1)
147 recursive = true
148 err = Touch(context.Background(), r.Fremote, "a")
149 recursive = false
150 require.NoError(t, err)
151 fstest.CheckListingWithPrecision(t, r.Fremote, []fstest.Item{file1, file2, file3}, []string{"a", "a/b", "a/b/c"}, fs.ModTimeNotSupported)
152}
153
154func TestTouchWithMetadata(t *testing.T) {
155 r := fstest.NewRun(t)

Callers

nothing calls this directly

Calls 5

WriteObjectMethod · 0.95
NewRunFunction · 0.92
TouchFunction · 0.85
MkdirMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…