forked from mirror/afero
adding List function to memmapfs
This commit is contained in:
parent
11dade3cc0
commit
f20e72f15f
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue