Source files can provide content as String or Bytes or Reader

This commit is contained in:
spf13 2014-11-04 00:28:20 -05:00
parent dcea0fa5ce
commit ad69374f8b

View 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())