Skip to main content
Version: 1.0

file_descriptor

Higher level abstraction for file stream.

These are Mojo built-ins, so you don't need to import them.

For example, here's how to print to a file

var f = open("my_file.txt", "w")
var fd = FileDescriptor(f)
print("hello", file=fd)
f.close()

Structs