Lines Matching refs:m

247 func (m *mockFs) followSymlinks(name string) string {
250 dir = m.followSymlinks(dir)
259 to, exists := m.symlinks[name]
272 func (m *mockFs) Open(name string) (ReaderAtSeekerCloser, error) {
274 name = m.followSymlinks(name)
275 if f, ok := m.files[name]; ok {
292 func (m *mockFs) Exists(name string) (bool, bool, error) {
294 name = m.followSymlinks(name)
295 if _, ok := m.files[name]; ok {
298 if _, ok := m.dirs[name]; ok {
304 func (m *mockFs) IsDir(name string) (bool, error) {
307 isDir, err := m.IsDir(dir)
321 name = m.followSymlinks(name)
323 if _, ok := m.dirs[name]; ok {
326 if _, ok := m.files[name]; ok {
332 func (m *mockFs) IsSymlink(name string) (bool, error) {
334 dir = m.followSymlinks(dir)
337 if _, isSymlink := m.symlinks[name]; isSymlink {
340 if _, isDir := m.dirs[name]; isDir {
343 if _, isFile := m.files[name]; isFile {
349 func (m *mockFs) Glob(pattern string, excludes []string, follow ShouldFollowSymlinks) (matches, dir…
350 return startGlob(m, pattern, excludes, follow)
365 func (m *mockFs) glob(pattern string) ([]string, error) {
369 toDir := m.followSymlinks(dir)
372 for _, f := range m.all {
404 func (m *mockFs) Lstat(name string) (os.FileInfo, error) {
406 dir = m.followSymlinks(dir)
413 if symlink, isSymlink := m.symlinks[name]; isSymlink {
416 } else if _, isDir := m.dirs[name]; isDir {
418 } else if _, isFile := m.files[name]; isFile {
420 ms.size = int64(len(m.files[name]))
428 func (m *mockFs) Stat(name string) (os.FileInfo, error) {
431 name = m.followSymlinks(name)
435 size: int64(len(m.files[name])),
438 if _, isDir := m.dirs[name]; isDir {
440 } else if _, isFile := m.files[name]; isFile {
442 ms.size = int64(len(m.files[name]))
450 func (m *mockFs) ReadDirNames(name string) ([]string, error) {
452 name = m.followSymlinks(name)
454 exists, isDir, err := m.Exists(name)
466 for _, f := range m.all {
475 func (m *mockFs) ListDirsRecursive(name string, follow ShouldFollowSymlinks) ([]string, error) {
476 return listDirsRecursive(m, name, follow)
479 func (m *mockFs) Readlink(name string) (string, error) {
481 dir = m.followSymlinks(dir)
486 if dest, isSymlink := m.symlinks[name]; isSymlink {
490 if exists, _, err := m.Exists(name); err != nil {