mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 17:06:53 +00:00
Scripts get the File and Folder classes as built-ins of the script engine. A script run from a file can test whether files exist, read their properties, list folders with getFiles (a mask or a function), and open files to read them with read, readln, readch, seek and tell. - Reads stay inside the script's folder and, when automation read roots are set, inside them too. A script given as text reads no files. Network and device paths, and paths outside the folder by their names, are refused before anything is looked up. Links and junctions that lead out are refused, and getFiles leaves them out. - The encoding comes from the byte order mark, then the encoding the script set, then UTF-8 when the bytes are valid, then CP1252. - Limits: 8 MiB a file, 32 MiB a run, 256 files open at once, 2,048 getFiles entries and 65,536 names looked at, and paths of at most 32,767 characters. - Writing, the file dialogs and execute are not available yet: they return false or null and set error. The report's hostCallCounts gains fileCalls and fileExecutes. Docs: docs/mcp.md, docs/target-app-parity.md.