• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use std::fs::File;
2 use std::io::prelude::*;
3 
4 use runfiles::Runfiles;
5 
main()6 fn main() {
7     let r = Runfiles::create().unwrap();
8 
9     let mut f = File::open(r.rlocation("examples/hello_runfiles/hello_runfiles.rs")).unwrap();
10 
11     let mut buffer = String::new();
12     f.read_to_string(&mut buffer).unwrap();
13 
14     println!("This program's source is {} characters long.", buffer.len());
15 }
16