atom/fs-plus

crash on calling list

adrien59cadri opened this issue · 1 comments

image

Here is my code, i have most recent version at this date (27/7/2015)
"name": "fs-plus",
"version": "2.8.1",

    var path = fs.normalize(command["path"]);
    console.log(path); // shows d:\github\
    var res = fs.list(path);
    console.log(res);//show undefined
    event.sender.send('command-res',res);

fs.list is asynchronous and requires a callback function as the second parameter.

Use fs.listSync for the synchronous version.