vai:lua_fs
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| vai:lua_fs [2026/09/14 15:39] – lightwolf | vai:lua_fs [2026/09/16 14:34] (current) – lightwolf | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== lua_fs ====== | + | ====== lua_fs |
| `lua_fs` is a Lua loadable shared library that exposes the C++17 `std:: | `lua_fs` is a Lua loadable shared library that exposes the C++17 `std:: | ||
| Line 61: | Line 61: | ||
| | `fs.set_current_path(path)` | Changes the process working directory. Returns no value. | `fs.set_current_path(" | | `fs.set_current_path(path)` | Changes the process working directory. Returns no value. | `fs.set_current_path(" | ||
| | `fs.temp_directory_path()` | Returns the operating system temporary directory. | `local temp = fs.temp_directory_path()` | | | `fs.temp_directory_path()` | Returns the operating system temporary directory. | `local temp = fs.temp_directory_path()` | | ||
| - | | `fs.directory(path)` | Returns a 1-based Lua array of immediate child paths. | `for _, p in ipairs(fs.directory(" | + | | `fs.directory(path)` | Returns a 1-based Lua array of immediate child paths. | <code lua>for _, p in ipairs(fs.directory(" |
| - | | `fs.recursive_directory(path)` | Returns a 1-based Lua array containing all descendants recursively. | `for _, p in ipairs(fs.recursive_directory(" | + | print(p) |
| + | end</ | ||
| + | | `fs.recursive_directory(path)` | Returns a 1-based Lua array containing all descendants recursively. | <code lua>for _, p in ipairs(fs.recursive_directory(" | ||
| + | print(p) | ||
| + | end</ | ||
| ==== Queries and metadata ==== | ==== Queries and metadata ==== | ||
vai/lua_fs.1789393199.txt.gz · Last modified: by lightwolf
