diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-08-12 11:01:05 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-08-12 12:14:07 -0700 |
| commit | 8561f7654cdf86d2d48d4c0fcf6f9a1bb5f117f0 (patch) | |
| tree | c6021e6e83805a0bb5c1f3366aa7d42240ef6199 /src/rt/rust_builtin.cpp | |
| parent | d1b3ed8c3f808182d74c4056eb8936943ad356fb (diff) | |
| download | rust-8561f7654cdf86d2d48d4c0fcf6f9a1bb5f117f0.tar.gz rust-8561f7654cdf86d2d48d4c0fcf6f9a1bb5f117f0.zip | |
Remove rust_list_files from std and rt
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index c9688f3cadb..90e4cc2115f 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -442,31 +442,6 @@ rust_str* c_str_to_rust(rust_task *task, char const *str) { return vec_alloc_with_data(task, len, len, 1, (void*)str); } -extern "C" CDECL rust_vec* -rust_list_files(rust_task *task, rust_str *path) { - array_list<rust_str*> strings; -#if defined(__WIN32__) - WIN32_FIND_DATA FindFileData; - HANDLE hFind = FindFirstFile((char*)path->data, &FindFileData); - if (hFind != INVALID_HANDLE_VALUE) { - do { - strings.push(c_str_to_rust(task, FindFileData.cFileName)); - } while (FindNextFile(hFind, &FindFileData)); - FindClose(hFind); - } -#else - DIR *dirp = opendir((char*)path->data); - if (dirp) { - struct dirent *dp; - while ((dp = readdir(dirp))) - strings.push(c_str_to_rust(task, dp->d_name)); - closedir(dirp); - } -#endif - return vec_alloc_with_data(task, strings.size(), strings.size(), - sizeof(rust_str*), strings.data()); -} - extern "C" CDECL rust_box* rust_list_files_ivec(rust_task *task, rust_str *path) { array_list<rust_str*> strings; |
