aboutsummaryrefslogtreecommitdiff
path: root/src/lib/std.rc
diff options
context:
space:
mode:
authorMarijn Haverbeke <[email protected]>2011-03-10 15:56:51 +0100
committerGraydon Hoare <[email protected]>2011-03-14 14:57:13 -0700
commitc731d625fe5f7626b41c7241893350b8b27b1dbe (patch)
tree9b5c8f5071d44d601914fa9ea1e44e07fe6f23db /src/lib/std.rc
parentSplit trans' collection in two passes. This allows us to handle tags (diff)
downloadrust-c731d625fe5f7626b41c7241893350b8b27b1dbe.tar.xz
rust-c731d625fe5f7626b41c7241893350b8b27b1dbe.zip
Add basic file-system functionality
std.fs.list_dir will list the files in a directory, std.fs.file_is_dir will, given a pathname, determine whether it is a directory or not.
Diffstat (limited to 'src/lib/std.rc')
-rw-r--r--src/lib/std.rc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/std.rc b/src/lib/std.rc
index 4ad422a3..8098a4e9 100644
--- a/src/lib/std.rc
+++ b/src/lib/std.rc
@@ -26,6 +26,8 @@ mod util;
// Authorize various rule-bendings.
auth io = unsafe;
+auth fs = unsafe;
+auth os_fs = unsafe;
auth _str = unsafe;
auth _vec = unsafe;
auth _task = unsafe;
@@ -41,12 +43,17 @@ auth rand.mk_rng = unsafe;
alt (target_os) {
case ("win32") {
mod os = "win32_os.rs";
+ mod os_fs = "win32_fs.rs";
} case ("macos") {
mod os = "macos_os.rs";
+ mod os_fs = "posix_fs.rs";
} else {
mod os = "linux_os.rs";
+ mod os_fs = "posix_fs.rs";
}
- }
+}
+mod fs;
+
// FIXME: parametric
mod map;
@@ -56,7 +63,6 @@ mod rand;
mod dbg;
mod bitv;
mod sort;
-mod path;
mod sha1;
// Local Variables: