Skip to content

stencil.Exists

Exists returns true if the file exists in the current directory

go
{{- if stencil.Exists "myfile.txt" }}
{{ stencil.ReadFile "myfile.txt" }}
{{- end }}