Quellcode durchsuchen

Add io.stdfile documentation

PucklaMotzer09 vor 4 Jahren
Ursprung
Commit
91cbfa53de
1 geänderte Dateien mit 16 neuen und 0 gelöschten Zeilen
  1. 16 0
      manual/builtin_modules.md

+ 16 - 0
manual/builtin_modules.md

@@ -1196,6 +1196,7 @@ The io operation module extends lua's built-in io module to provide more easy-to
 | [io.print](#ioprint) | Formatting output with a line feed to a file | >= 2.0.1 |
 | [io.printf](#ioprintf) | No line formatted output to file | >= 2.0.1 |
 | [io.lines](#iolines) | Read all lines from file | >= 2.2.9 |
+| [io.stdfile](#iostdfile) | Get std file | >= 2.2.9 |
 
 #### io.open
 
@@ -1357,6 +1358,21 @@ Returns all lines from a given file name
 io.lines("xxx.txt")
 ```
 
+### io.stdfile
+
+- Get a std file
+
+Returns a file for a given std file name
+
+```lua
+-- returns stdin
+io.stdfile("/dev/stdin")
+-- returns stdout
+io.stdfile("/dev/stdout")
+-- returns stderr
+io.stdfile("/dev/stderr")
+```
+
 ### path
 
 The path operation module implements cross-platform path operations, which is a custom module of xmake.