-
-
Save mitsuhiko/4013696 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
match os::homedir() { | |
None => { | |
io::println("You have no home folder :-("); | |
} | |
Some(ref homedir) => { | |
io::println("Files in your home folder:"); | |
for os::list_dir_path(homedir).each |path| { | |
match path.filename() { | |
Some(ref filename) => io::println(*filename), | |
_ => {} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment