summaryrefslogtreecommitdiff
path: root/src/node_file.cc
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <saghul@gmail.com>2014-10-17 09:31:23 +0200
committerTrevor Norris <trev.norris@gmail.com>2014-11-05 16:50:58 -0800
commita5f1307e45305cb7cf41e0e99cf1df74730cad6c (patch)
tree3dd9af065274738b543c54be0483788d935e8dcd /src/node_file.cc
parentce112c27c636ba17129d6061f8db636a80faeb48 (diff)
downloadnode-new-a5f1307e45305cb7cf41e0e99cf1df74730cad6c.tar.gz
core: replace uv_fs_readdir with uv_fs_scandir
PR-URL: https://github.com/joyent/node/pull/8566 Reviewed-by: Fedor Indutny <fedor@indutny.com> Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'src/node_file.cc')
-rw-r--r--src/node_file.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/node_file.cc b/src/node_file.cc
index 8962f8680a..5a8d6ea467 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -205,7 +205,7 @@ static void After(uv_fs_t *req) {
argv[1] = Integer::New(env->isolate(), req->result);
break;
- case UV_FS_READDIR:
+ case UV_FS_SCANDIR:
{
int r;
Local<Array> names = Array::New(env->isolate(), 0);
@@ -213,7 +213,7 @@ static void After(uv_fs_t *req) {
for (int i = 0; ; i++) {
uv_dirent_t ent;
- r = uv_fs_readdir_next(req, &ent);
+ r = uv_fs_scandir_next(req, &ent);
if (r == UV_EOF)
break;
if (r != 0) {
@@ -710,9 +710,9 @@ static void ReadDir(const FunctionCallbackInfo<Value>& args) {
node::Utf8Value path(args[0]);
if (args[1]->IsFunction()) {
- ASYNC_CALL(readdir, args[1], *path, 0 /*flags*/)
+ ASYNC_CALL(scandir, args[1], *path, 0 /*flags*/)
} else {
- SYNC_CALL(readdir, *path, *path, 0 /*flags*/)
+ SYNC_CALL(scandir, *path, *path, 0 /*flags*/)
assert(SYNC_REQ.result >= 0);
int r;
@@ -721,7 +721,7 @@ static void ReadDir(const FunctionCallbackInfo<Value>& args) {
for (int i = 0; ; i++) {
uv_dirent_t ent;
- r = uv_fs_readdir_next(&SYNC_REQ, &ent);
+ r = uv_fs_scandir_next(&SYNC_REQ, &ent);
if (r == UV_EOF)
break;
if (r != 0)