Skip to content

Commit

Permalink
Source files can provide content as String or Bytes or Reader
Browse files Browse the repository at this point in the history
  • Loading branch information
spf13 committed Nov 4, 2014
1 parent dcea0fa commit ad69374
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit ad69374

Please sign in to comment.