Read Project File From Lua - INTERFACEWARE Help Center
Có thể bạn quan tâm
Iguana Documentation Home›V6 Knowledge Base›Developing Interfaces›Repositories›Builtin Repositories›Iguana Files Read Project File From Lua
- Introduction
- Using the Code
- How it works
- More Information
This example shows how to use the builtin Iguana file APIs to load files from a project for an Iguana translator instance. The technique is simply to understand the layout of the file system and use standard Lua file APIs to load the files in question.
If you have any questions please contact us at [email protected].
Using the Code [top]- Import the Read Project File From Lua channel from the Builtin: Iguana Files repository
- Experiment with the code to find out how it works
- Adapt the code to your own requirements
- Copy the loadFile() function into your script Note: You may want to put the loadFile() function in a module
- Then just copy the code you need from main() into your script, and adapt it as needed
This is the github code for the main module:
How it works [top]- Find the root directory for the project (a subdirectory of the Iguana instance project root directory)
- Use iguana.project.root() to find the root directory for the Iguana instance
- Use iguana.project.guid() to find the project guid
- Append the guid to the root directory
- Load a file from the project root directory
- Use the loadFile() function to load the local.xml file Note: loadFile() uses builtin API functions to open, read and close a file
- Load a file from the “other” directory (a subdirectory of the Iguana instance project root directory)
- Append “other/example.xml” to the Iguana instance project root directory
- Append the name of the file to load, we appended “example.xml”
- Use loadFile() to load the file
- Source code for the main module on github
- API documentation for io, os and iguana
Từ khóa » File Lửa
-
LUA File Extension - What Is A .lua File And How Do I Open It?
-
Lua - File I/O - Tutorialspoint
-
How To Make A Lua File? - Stack Overflow
-
Lua (programming Language) - Wikipedia
-
Lua File | How To Work With File In Lua With Example? - EduCBA
-
The Programming Language Lua
-
Inline File Validation With Lua Script - IBM
-
Hình ảnh Lửa PNG, Vector, PSD, Và Biểu Tượng để Tải Về Miễn Phí
-
LuaFileSystem
-
Lua Configuration Files — WirePlumber 0.4.11 Documentation
-
F:seek - MUSHclient Documentation: Contents
-
LuaFileSystem - GitHub Pages
-
Fast Written Lua Script To Rename Some Files On My Computer · GitHub