mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
@@ -3,19 +3,15 @@ title: os.Stat
|
||||
description: Returns a FileInfo structure describing a file or directory.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
aliases: []
|
||||
related:
|
||||
- functions/os/FileExists
|
||||
- functions/os/Getenv
|
||||
- functions/os/ReadDir
|
||||
- functions/os/ReadFile
|
||||
returnType: os.FileInfo
|
||||
signatures: [os.Stat PATH]
|
||||
params:
|
||||
functions_and_methods:
|
||||
aliases: []
|
||||
returnType: os.FileInfo
|
||||
signatures: [os.Stat PATH]
|
||||
aliases: [/functions/os.stat]
|
||||
---
|
||||
|
||||
The `os.Stat` function attempts to resolve the path relative to the root of your project directory. If a matching file or directory is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.
|
||||
The `os.Stat` function attempts to resolve the path relative to the root of your project directory. If a matching file or directory is not found, it will attempt to resolve the path relative to the [`contentDir`](/configuration/all/#contentdir). A leading path separator (`/`) is optional.
|
||||
|
||||
```go-html-template
|
||||
{{ $f := os.Stat "README.md" }}
|
||||
|
Reference in New Issue
Block a user