MCPcopy Index your code
hub / github.com/filebrowser/filebrowser / TestFileInfoRealPathUsesScopedFsRealPath

Function TestFileInfoRealPathUsesScopedFsRealPath

files/file_test.go:335–347  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

333}
334
335func TestFileInfoRealPathUsesScopedFsRealPath(t *testing.T) {
336 root := t.TempDir()
337 file := &FileInfo{
338 Fs: NewScopedFs(afero.NewOsFs(), root),
339 Path: "/root/downloads",
340 }
341
342 got := file.RealPath()
343 want := filepath.Join(root, "root", "downloads")
344 if got != want {
345 t.Fatalf("got %q, want %q", got, want)
346 }
347}

Callers

nothing calls this directly

Calls 2

RealPathMethod · 0.95
NewScopedFsFunction · 0.85

Tested by

no test coverage detected