aboutsummaryrefslogtreecommitdiff
path: root/src/lib/path.rs
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/path.rs
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/path.rs')
-rw-r--r--src/lib/path.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/lib/path.rs b/src/lib/path.rs
deleted file mode 100644
index 9cda93d6..00000000
--- a/src/lib/path.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-
-type path = str;
-
-fn dirname(path p) -> path {
- auto sep = os.path_sep();
- check (_str.byte_len(sep) == 1u);
- let int i = _str.rindex(p, sep.(0));
- if (i == -1) {
- ret p;
- }
- ret _str.substr(p, 0u, i as uint);
-}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// compile-command: "make -k -C .. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
-// End: