Editor Plugins
English
Appearance
The fs.read_to_string function is used to read a file and return a string.
fs.read_to_string
string
use std.fs; fn main() throws { let content = try fs.read_to_string("path/to/file.txt"); }