Lines Matching defs:MockFs
172 type MockFs struct { struct
174 viewId string //
175 deviceNumber uint64
178 root mockDir
179 Clock *Clock
180 workDir string
181 nextInodeNumber uint64
184 StatCalls []string
185 ReadDirCalls []string
186 aggregatesLock sync.Mutex
227 func (m *MockFs) resolve(path string, followLastLink bool) (result string, err error) {
237 …ockFs) followLinks(path string, followLastLink bool, count int) (canonicalPath string, err error) {
290 func (m *MockFs) followLink(link *mockLink, parentPath string) (result string) {
294 func (m *MockFs) getFile(parentDir *mockDir, fileName string) (file *mockFile, err error) {
323 func (m *MockFs) getInode(parentDir *mockDir, name string) (inode *mockInode, err error) {
344 func (m *MockFs) Open(path string) (io.ReadCloser, error) {
408 func (m *MockFs) dirToFileInfo(d *mockDir, path string) (info *mockFileInfo) {
421 func (m *MockFs) fileToFileInfo(f *mockFile, path string) (info *mockFileInfo) {
433 func (m *MockFs) linkToFileInfo(l *mockLink, path string) (info *mockFileInfo) {
445 func (m *MockFs) Lstat(path string) (stats os.FileInfo, err error) {
488 func (m *MockFs) InodeNumber(info os.FileInfo) (number uint64, err error) {
495 func (m *MockFs) DeviceNumber(info os.FileInfo) (number uint64, err error) {
502 func (m *MockFs) PermTime(info os.FileInfo) (when time.Time, err error) {
511 func (m *MockFs) ReadDir(path string) (contents []DirEntryInfo, err error) {
550 func (m *MockFs) Rename(sourcePath string, destPath string) error {
664 func (m *MockFs) newInodeNumber() uint64 {
670 func (m *MockFs) WriteFile(filePath string, data []byte, perm os.FileMode) error {
713 func (m *MockFs) newFile() *mockFile {
721 func (m *MockFs) newDir() *mockDir {
733 func (m *MockFs) newLink(target string) *mockLink {
743 func (m *MockFs) MkDirs(path string) error {
749 func (m *MockFs) getDir(path string, createIfMissing bool) (dir *mockDir, err error) {
798 func (m *MockFs) Remove(path string) (err error) {
848 func (m *MockFs) Symlink(oldPath string, newPath string) (err error) {
870 func (m *MockFs) RemoveAll(path string) (err error) {
919 func (m *MockFs) SetReadable(path string, readable bool) error {
927 func (m *MockFs) SetReadErr(path string, readErr error) error {
954 func (m *MockFs) ClearMetrics() {
959 func (m *MockFs) ViewId() (id string) {
963 func (m *MockFs) SetViewId(id string) {
966 func (m *MockFs) SetDeviceNumber(deviceNumber uint64) {