Example #1
0
func readLink(fs pathfs.FileSystem, name string) *linkResponse {
	a, code := fs.Readlink(name, nil)
	return &linkResponse{
		linkContent: a,
		Status:      code,
	}
}
Example #2
0
func (s *fuseTestSuite) TestSymlink() {
	datasetName := "TestSymlink"
	str := spec.CreateValueSpecString("ldb", s.LdbDir, datasetName)

	var testfs pathfs.FileSystem

	start(str, func(fs pathfs.FileSystem) { testfs = fs })

	code := testfs.Symlink("there", "here", nil)
	assert.Equal(s.T(), fuse.OK, code)
	assertAttr(s, testfs, "here", 0755|fuse.S_IFLNK, 0)
	value, code := testfs.Readlink("here", nil)
	assert.Equal(s.T(), fuse.OK, code)
	assert.Equal(s.T(), "there", value)
}