ref: ad69374f8b132f0afddb9203300c600b9f21386b
parent: dcea0fa5ce125d1a9009b5e5b8a38f00c57bcee9
author: spf13 <[email protected]>
date: Mon Nov 3 19:28:20 EST 2014
Source files can provide content as String or Bytes or Reader
--- a/source/file.go
+++ b/source/file.go
@@ -39,6 +39,14 @@
return f.uniqueId
}
+func (f *File) String() string {
+ return helpers.ReaderToString(f.Contents)
+}
+
+func (f *File) Bytes() []byte {
+ return helpers.ReaderToBytes(f.Contents)
+}
+
// Filename without extension
func (f *File) BaseFileName() string {
return helpers.Filename(f.LogicalName())