adding List function to memmapfs

This commit is contained in:
spf13 2014-12-12 13:32:57 -05:00
parent 11dade3cc0
commit f20e72f15f
1 changed files with 8 additions and 0 deletions

View File

@ -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())
}
}