Lines Matching refs:filesystem
26 func Write(t *testing.T, path string, content string, filesystem *MockFs) {
28 filesystem.MkDirs(parent)
29 err := filesystem.WriteFile(path, []byte(content), 0777)
35 func Create(t *testing.T, path string, filesystem *MockFs) {
36 Write(t, path, "hi", filesystem)
39 func Delete(t *testing.T, path string, filesystem *MockFs) {
40 err := filesystem.Remove(path)
46 func RemoveAll(t *testing.T, path string, filesystem *MockFs) {
47 err := filesystem.RemoveAll(path)
53 func Move(t *testing.T, oldPath string, newPath string, filesystem *MockFs) {
54 err := filesystem.Rename(oldPath, newPath)
60 func Link(t *testing.T, newPath string, oldPath string, filesystem *MockFs) {
62 err := filesystem.MkDirs(parentPath)
66 err = filesystem.Symlink(oldPath, newPath)
72 func Read(t *testing.T, path string, filesystem *MockFs) string {
73 reader, err := filesystem.Open(path)
84 func ModTime(t *testing.T, path string, filesystem *MockFs) time.Time {
85 stats, err := filesystem.Lstat(path)
92 func SetReadable(t *testing.T, path string, readable bool, filesystem *MockFs) {
93 err := filesystem.SetReadable(path, readable)
99 func SetReadErr(t *testing.T, path string, readErr error, filesystem *MockFs) {
100 err := filesystem.SetReadErr(path, readErr)