A simple scripting language in C++
Ferenc Szontágh
2025-04-19 c8f8dbada301cd66d8c40cd0bd8ea0e8ae669644
1
2
3
4
5
6
7
8
9
# File I/O Feature Test
string $f = "test_file_io.txt";
print("file_exists before create: ", file_exists($f), "\n");
file_put_contents($f, "Hello from VoidScript!", false);
print("file_exists after create: ", file_exists($f), "\n");
print("file_get_contents: ", file_get_contents($f), "\n");
# Overwrite with permission
file_put_contents($f, "Overwritten content", true);
print("file_get_contents after overwrite: ", file_get_contents($f), "\n");