diff options
Diffstat (limited to 'hugofs/fileinfo.go')
-rw-r--r-- | hugofs/fileinfo.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hugofs/fileinfo.go b/hugofs/fileinfo.go index 79d89a88b..5bfb1ff32 100644 --- a/hugofs/fileinfo.go +++ b/hugofs/fileinfo.go @@ -37,6 +37,7 @@ import ( const ( metaKeyFilename = "filename" + metaKeySourceRoot = "sourceRoot" metaKeyBaseDir = "baseDir" // Abs base directory of source file. metaKeyMountRoot = "mountRoot" metaKeyModule = "module" @@ -128,6 +129,10 @@ func (f FileMeta) PathFile() string { return strings.TrimPrefix(strings.TrimPrefix(f.Filename(), base), filepathSeparator) } +func (f FileMeta) SourceRoot() string { + return f.stringV(metaKeySourceRoot) +} + func (f FileMeta) MountRoot() string { return f.stringV(metaKeyMountRoot) } |