aboutsummaryrefslogtreecommitdiff
path: root/src/lib/_str.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/_str.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/_str.rs')
-rw-r--r--src/lib/_str.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/_str.rs b/src/lib/_str.rs
index 3f453349..526dac8f 100644
--- a/src/lib/_str.rs
+++ b/src/lib/_str.rs
@@ -106,6 +106,11 @@ fn from_bytes(vec[u8] v) : is_utf8(v) -> str {
ret rustrt.str_from_vec(v);
}
+// FIXME temp thing
+fn unsafe_from_bytes(vec[u8] v) -> str {
+ ret rustrt.str_from_vec(v);
+}
+
fn refcount(str s) -> uint {
auto r = rustrt.refcount[u8](s);
if (r == dbg.const_refcount) {