(name string)
| 67 | } |
| 68 | |
| 69 | func (f FakeFileSystem) ReadFile(name string) ([]byte, error) { |
| 70 | content, ok := f.Files[name] |
| 71 | if !ok { |
| 72 | return nil, os.ErrNotExist |
| 73 | } |
| 74 | if content == EmptyDirectoryMarker { |
| 75 | return nil, &os.PathError{Op: "read", Path: name, Err: os.ErrInvalid} |
| 76 | } |
| 77 | return []byte(content), nil |
| 78 | } |
| 79 | |
| 80 | func (f FakeFileSystem) ReadDir(name string) ([]fs.DirEntry, error) { |
| 81 | name = strings.TrimSuffix(name, "/") |
nothing calls this directly
no outgoing calls
no test coverage detected