diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/fileInfo.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/fileInfo.go b/source/fileInfo.go index 3f262fb5e..072b55b6c 100644 --- a/source/fileInfo.go +++ b/source/fileInfo.go @@ -53,6 +53,8 @@ type fileOverlap interface { // Lang is the language code for this page. It will be the // same as the site's language code. Lang() string + + IsZero() bool } type FileWithoutOverlap interface { @@ -187,6 +189,10 @@ func (fi *FileInfo) Open() (hugio.ReadSeekCloser, error) { return f, err } +func (fi *FileInfo) IsZero() bool { + return fi == nil +} + // We create a lot of these FileInfo objects, but there are parts of it used only // in some cases that is slightly expensive to construct. func (fi *FileInfo) init() { |