MCPcopy
hub / github.com/rclone/rclone / TestDirStat

Function TestDirStat

vfs/dir_test.go:228–240  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

226}
227
228func TestDirStat(t *testing.T) {
229 _, _, dir, _ := dirCreate(t)
230
231 node, err := dir.Stat("file1")
232 require.NoError(t, err)
233 _, ok := node.(*File)
234 assert.True(t, ok)
235 assert.Equal(t, int64(14), node.Size())
236 assert.Equal(t, "file1", node.Name())
237
238 _, err = dir.Stat("not found")
239 assert.Equal(t, ENOENT, err)
240}
241
242// This lists dir and checks the listing is as expected
243func checkListing(t *testing.T, dir *Dir, want []string) {

Callers

nothing calls this directly

Calls 5

dirCreateFunction · 0.85
StatMethod · 0.65
SizeMethod · 0.65
NameMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…