rust/src/lib/win32_fs.rs

27 lines
792 B
Rust
Raw Normal View History

native "rust" mod rustrt {
fn rust_list_files(str path) -> vec[str];
fn rust_file_is_dir(str path) -> int;
}
2011-04-19 13:35:49 -07:00
fn list_dir(str path) -> vec[str] {
ret rustrt::rust_list_files(path+"*");
}
/* FIXME: win32 path handling actually accepts '/' or '\' and has subtly
* different semantics for each. Since we build on mingw, we are usually
* dealing with /-separated paths. But the whole interface to splitting and
* joining pathnames needs a bit more abstraction on win32. Possibly a vec or
* tag type.
*/
const char path_sep = '/';
2011-05-05 14:31:10 -07:00
const char alt_path_sep = '\\';
// 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: