Skip to content

Commit

Permalink
docs: Update stat.md to reference os.Stat
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenesvk authored and twpayne committed Nov 30, 2022
1 parent fe3ec77 commit b9d55e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions assets/chezmoi.io/docs/reference/templates/functions/stat.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# `stat` *name*

`stat` runs `stat(2)` on *name*. If *name* exists it returns structured data.
If *name* does not exist then it returns a false value. If `stat(2)` returns
any other error then it raises an error. The structured value returned if
*name* exists contains the fields `name`, `size`, `mode`, `perm`, `modTime`,
and `isDir`.
`stat` runs [`os.Stat`](https://pkg.go.dev/os#File.Stat) on *name*. If *name*
exists it returns structured data. If *name* does not exist then it returns a
false value. If `os.Stat` returns any other error then it raises an error. The
structured value returned if *name* exists contains the fields `name`, `size`,
`mode`, `perm`, `modTime`, and `isDir`.

`stat` is not hermetic: its return value depends on the state of the filesystem
at the moment the template is executed. Exercise caution when using it in your
Expand Down

0 comments on commit b9d55e0

Please sign in to comment.