2011-03-10 15:56:51 +01:00
|
|
|
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] {
|
2011-05-12 17:24:54 +02:00
|
|
|
ret rustrt::rust_list_files(path+"*");
|
2011-03-10 15:56:51 +01:00
|
|
|
}
|
|
|
|
|
2011-03-20 19:43:12 -07:00
|
|
|
/* 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 = '\\';
|
2011-03-16 14:58:02 -07:00
|
|
|
|
|
|
|
// 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:
|