// Example 9: File I/O
// Demonstrates: Reading and writing files
// Usage: ruchy examples/cli/09_file_io.ruchy

// Write to file
let content = "Hello from Ruchy!\nThis is a test file.\n"
fs_write("/tmp/ruchy_test.txt", content)
println("File written to /tmp/ruchy_test.txt")

// Read from file
let data = fs_read("/tmp/ruchy_test.txt")
println("File contents:")
println(data)

// Check if file exists
if fs_exists("/tmp/ruchy_test.txt") {
    println("File exists!")
}

// Clean up
fs_remove("/tmp/ruchy_test.txt")
println("File removed")
