Skip to content

Commit bc194ed

Browse files
authored
update lua walk function doc (#489)
1 parent c5d1dbe commit bc194ed

File tree

2 files changed

+36
-18
lines changed

2 files changed

+36
-18
lines changed

generated/routes.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"/overview/management-api-reference": {
1515
"relPath": "/overview/management-api-reference.md",
16-
"lastmod": "2025-07-09T01:30:04.000Z"
16+
"lastmod": "2025-07-15T06:47:44.000Z"
1717
},
1818
"/overview/agent-api-reference": {
1919
"relPath": "/overview/agent-api-reference.md",
@@ -25,19 +25,19 @@
2525
},
2626
"/getting-started/first-steps": {
2727
"relPath": "/getting-started/first-steps/index.md",
28-
"lastmod": "2025-07-14T14:28:27.000Z"
28+
"lastmod": "2025-07-14T14:40:01.000Z"
2929
},
3030
"/getting-started/first-steps/cli-quickstart": {
3131
"relPath": "/getting-started/first-steps/cli-quickstart.md",
32-
"lastmod": "2025-07-14T14:28:27.000Z"
32+
"lastmod": "2025-07-14T14:40:01.000Z"
3333
},
3434
"/getting-started/first-steps/existing-cluster": {
3535
"relPath": "/getting-started/first-steps/existing-cluster.md",
3636
"lastmod": "2025-03-27T19:09:28.000Z"
3737
},
3838
"/getting-started/first-steps/plural-cloud": {
3939
"relPath": "/getting-started/first-steps/plural-cloud.md",
40-
"lastmod": "2025-07-14T14:28:27.000Z"
40+
"lastmod": "2025-07-14T15:36:50.000Z"
4141
},
4242
"/getting-started/how-to-use": {
4343
"relPath": "/getting-started/how-to-use/index.md",
@@ -53,23 +53,23 @@
5353
},
5454
"/getting-started/how-to-use/scm-connection": {
5555
"relPath": "/getting-started/how-to-use/scm-connection.md",
56-
"lastmod": "2025-07-14T14:28:27.000Z"
56+
"lastmod": "2025-07-14T14:40:01.000Z"
5757
},
5858
"/getting-started/how-to-use/workload-cluster": {
5959
"relPath": "/getting-started/how-to-use/workload-cluster.md",
6060
"lastmod": "2025-03-12T14:59:41.000Z"
6161
},
6262
"/getting-started/how-to-use/controllers": {
6363
"relPath": "/getting-started/how-to-use/controllers.md",
64-
"lastmod": "2025-07-14T14:28:27.000Z"
64+
"lastmod": "2025-07-14T14:40:01.000Z"
6565
},
6666
"/getting-started/how-to-use/observability": {
6767
"relPath": "/getting-started/how-to-use/observability.md",
68-
"lastmod": "2025-07-14T14:28:27.000Z"
68+
"lastmod": "2025-07-14T14:40:01.000Z"
6969
},
7070
"/getting-started/how-to-use/microservice": {
7171
"relPath": "/getting-started/how-to-use/microservice.md",
72-
"lastmod": "2025-07-14T14:28:27.000Z"
72+
"lastmod": "2025-07-14T14:40:01.000Z"
7373
},
7474
"/getting-started/how-to-use/pr-automation": {
7575
"relPath": "/getting-started/how-to-use/pr-automation.md",
@@ -81,7 +81,7 @@
8181
},
8282
"/getting-started/how-to-use/cleaning-up": {
8383
"relPath": "/getting-started/how-to-use/cleaning-up.md",
84-
"lastmod": "2025-07-14T14:28:27.000Z"
84+
"lastmod": "2025-07-14T14:40:01.000Z"
8585
},
8686
"/getting-started/advanced-config": {
8787
"relPath": "/getting-started/advanced-config/index.md",
@@ -377,7 +377,7 @@
377377
},
378378
"/getting-started/quickstart": {
379379
"relPath": "/getting-started/first-steps/index.md",
380-
"lastmod": "2025-07-14T14:28:27.000Z"
380+
"lastmod": "2025-07-14T14:40:01.000Z"
381381
},
382382
"/deployments/architecture": {
383383
"relPath": "/overview/architecture.md",
@@ -393,15 +393,15 @@
393393
},
394394
"/deployments/cli-quickstart": {
395395
"relPath": "/getting-started/first-steps/cli-quickstart.md",
396-
"lastmod": "2025-07-14T14:28:27.000Z"
396+
"lastmod": "2025-07-14T14:40:01.000Z"
397397
},
398398
"/deployments/existing-cluster": {
399399
"relPath": "/getting-started/first-steps/existing-cluster.md",
400400
"lastmod": "2025-03-27T19:09:28.000Z"
401401
},
402402
"/getting-started/deployments": {
403403
"relPath": "/getting-started/first-steps/index.md",
404-
"lastmod": "2025-07-14T14:28:27.000Z"
404+
"lastmod": "2025-07-14T14:40:01.000Z"
405405
},
406406
"/how-to/set-up/mgmt-cluster": {
407407
"relPath": "/getting-started/how-to-use/mgmt-cluster.md",
@@ -413,23 +413,23 @@
413413
},
414414
"/how-to/set-up/scm-connection": {
415415
"relPath": "/getting-started/how-to-use/scm-connection.md",
416-
"lastmod": "2025-07-14T14:28:27.000Z"
416+
"lastmod": "2025-07-14T14:40:01.000Z"
417417
},
418418
"/how-to/set-up/workload-cluster": {
419419
"relPath": "/getting-started/how-to-use/workload-cluster.md",
420420
"lastmod": "2025-03-12T14:59:41.000Z"
421421
},
422422
"/how-to/set-up/controllers": {
423423
"relPath": "/getting-started/how-to-use/controllers.md",
424-
"lastmod": "2025-07-14T14:28:27.000Z"
424+
"lastmod": "2025-07-14T14:40:01.000Z"
425425
},
426426
"/how-to/deploy/pr-automation": {
427427
"relPath": "/getting-started/how-to-use/pr-automation.md",
428428
"lastmod": "2025-03-12T14:59:41.000Z"
429429
},
430430
"/how-to/deploy/microservice": {
431431
"relPath": "/getting-started/how-to-use/microservice.md",
432-
"lastmod": "2025-07-14T14:28:27.000Z"
432+
"lastmod": "2025-07-14T14:40:01.000Z"
433433
},
434434
"/how-to/deploy/pipelines": {
435435
"relPath": "/getting-started/how-to-use/pipelines.md",

pages/plural-features/continuous-deployment/lua.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,32 @@ end
127127
Returns a list of all files within the specified directory and its subdirectories.
128128

129129
```lua
130-
local files = fs.walk(".")
131-
if files then
132-
values["allFiles"] = files
130+
-- Example 1: Walk directory without ignoring dotfiles
131+
local files, err = fs.walk("mydir")
132+
if not files then
133+
print("Error:", err)
134+
else
135+
for _, file in ipairs(files) do
136+
print(file)
137+
end
138+
end
139+
140+
-- Example 2: Walk directory while ignoring dotfiles
141+
local files, err = fs.walk("mydir", true)
142+
if not files then
143+
print("Error:", err)
144+
else
145+
for _, file in ipairs(files) do
146+
print(file)
147+
end
133148
end
149+
134150
```
135151

136152
**Parameters:**
137153
- `directory` (string): Relative path to the directory within the base directory
154+
- `ignoreDotfiles` (boolean, optional): When set to `true`, the function will exclude dotfiles and directories starting with `.` from the returned list. Default value: `false`
155+
138156

139157
**Returns:**
140158
- `[string]`: Array of relative file paths, or `nil` and error message on failure

0 commit comments

Comments
 (0)