Source files can provide content as String or Bytes or Reader
authorspf13 <steve.francia@gmail.com>
Tue, 4 Nov 2014 05:28:20 +0000 (00:28 -0500)
committerspf13 <steve.francia@gmail.com>
Tue, 4 Nov 2014 05:28:20 +0000 (00:28 -0500)
source/file.go

index ce1469d5d5ab2a50ff1a9c0242c4a3ac1e033c44..909d457db34f5e14b5a8755c772327317eeb9c29 100644 (file)
@@ -39,6 +39,14 @@ func (f *File) UniqueId() string {
        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())