Support extending files in memoryfs truncate
diff --git a/memfs/memory.go b/memfs/memory.go
index 1d1a0e2..2f8dcae 100644
--- a/memfs/memory.go
+++ b/memfs/memory.go
@@ -273,7 +273,10 @@
 func (f *file) Truncate(size int64) error {
 	if size < int64(len(f.content.bytes)) {
 		f.content.bytes = f.content.bytes[:size]
+	} else if more := int(size)-len(f.content.bytes); more > 0 {
+		f.content.bytes = append(f.content.bytes, make([]byte, more)...)
 	}
+
 	return nil
 }