MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestFS_ExistFile

Function TestFS_ExistFile

internal/utils/bfs/fs_test.go:88–102  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86}
87
88func TestFS_ExistFile(t *testing.T) {
89 fs, openErr := bfs.OpenFS(Tea.Root+"/data/bfs/test", bfs.DefaultFSOptions)
90 if openErr != nil {
91 t.Fatal(openErr)
92 }
93 defer func() {
94 _ = fs.Close()
95 }()
96
97 exist, err := fs.ExistFile(bfs.Hash("123456"))
98 if err != nil {
99 t.Fatal(err)
100 }
101 t.Log("exist:", exist)
102}
103
104func TestFS_RemoveFile(t *testing.T) {
105 fs, openErr := bfs.OpenFS(Tea.Root+"/data/bfs/test", bfs.DefaultFSOptions)

Callers

nothing calls this directly

Calls 5

OpenFSFunction · 0.92
HashFunction · 0.92
LogMethod · 0.80
CloseMethod · 0.65
ExistFileMethod · 0.45

Tested by

no test coverage detected