Workspace Script

Execute Low-Code in the workspace to access text files within the folder

Input Object

In the script, you can directly access the input object. Each key in the input object corresponds to a .txt file name (excluding the file extension) in the workspace and each value represents the text content of that file. When the script is executed, all .txt files are automatically loaded, saving the need to read them manually in the script:

Output Object

When the script needs to output multiple text files, you can directly modify the output object. Each key-value pair added to the output object will be output as a .txt file in the workspace, with the file name being the key and the text content being the corresponding value for that key.

API

Provides synchronous functions: api.files(), api.stat(filename), api.read(filename, encoding='utf8'), api.write(filename, text), api.rename(oldname, newname), and api .remove(filename). Additionally, built-in libraries such as moment.js and lodash.js can be used directly:

And asynchronous functions that return a Promise object: api.run(uuid), api.readCSV(filename, separator, skiplines), api.splitCSV(filename, separator, skiplines, newname, maxRows), api.writeCSV(filename, rows, header), and api.writeXML(filename, obj, options):

Additionally, zip read and write APIs are provided for compressing or decompressing files in the working folder. These APIs are asynchronous functions as well:

--

We are dedicated to improving our content. Please let us know if you come across any errors, including spelling, grammar or other mistakes, as your feedback is valuable to us! 🤖️⚡️

Last updated