mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
This commit is contained in:
@@ -1,22 +1,17 @@
|
||||
---
|
||||
title: os.ReadDir
|
||||
linkTitle: readDir
|
||||
description: Returns an array of FileInfo structures sorted by file name, one element for each directory entry.
|
||||
categories: [functions]
|
||||
categories: []
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
function:
|
||||
action:
|
||||
aliases: [readDir]
|
||||
returnType: FileInfo
|
||||
related:
|
||||
- functions/os/FileExists
|
||||
- functions/os/Getenv
|
||||
- functions/os/ReadFile
|
||||
- functions/os/Stat
|
||||
returnType: os.FileInfo
|
||||
signatures: [os.ReadDir PATH]
|
||||
relatedFunctions:
|
||||
- os.FileExists
|
||||
- os.Getenv
|
||||
- os.ReadDir
|
||||
- os.ReadFile
|
||||
- os.Stat
|
||||
aliases: [/functions/readdir]
|
||||
---
|
||||
|
||||
@@ -36,7 +31,7 @@ content/
|
||||
This template code:
|
||||
|
||||
```go-html-template
|
||||
{{ range os.ReadDir "content" }}
|
||||
{{ range readDir "content" }}
|
||||
{{ .Name }} → {{ .IsDir }}
|
||||
{{ end }}
|
||||
```
|
||||
|
Reference in New Issue
Block a user