From f20e72f15fbaacf84b710cbde809bf5c5c95aa59 Mon Sep 17 00:00:00 2001 From: spf13 Date: Fri, 12 Dec 2014 13:32:57 -0500 Subject: [PATCH] adding List function to memmapfs --- memmap.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/memmap.go b/memmap.go index d820502..2474a3f 100644 --- a/memmap.go +++ b/memmap.go @@ -15,6 +15,7 @@ package afero import ( "errors" + "fmt" "os" "path" "path/filepath" @@ -257,3 +258,10 @@ func (m *MemMapFs) Chtimes(name string, atime time.Time, mtime time.Time) error } return nil } + +func (m *MemMapFs) List() { + for _, x := range m.data { + y, _ := x.Stat() + fmt.Println(x.Name(), y.Size()) + } +}