koOs.listdir: Not enough arguments

Huh…
Source code:

var os = Components.classes["@activestate.com/koOs;1"].getService(Components.interfaces.koIOs);
var kodoc = komodo.koDoc;
var path = kodoc.file.dirName;
var dirlist = os.listdir(path); 

Error:

var dirlist = os.listdir(path);

NS_ERROR_XPC_NOT_ENOUGH_ARGS: Not enough arguments [koIOs.listdir]

exception[lineNumber] = 693
exception[name] = NS_ERROR_XPC_NOT_ENOUGH_ARGS
exception[message] = Not enough arguments [koIOs.listdir]
exception[QueryInterface] = function QueryInterface() {
    [native code]
}
exception[result] = 2153185281
exception[filename] = chrome://komodo/content/project/peMacro.js
exception[columnNumber] = 0
exception[location] = JS frame :: chrome://komodo/content/project/peMacro.js :: anonymous :: line 693
exception[inner] = null
exception[data] = null
exception[initialize] = function initialize() {
    [native code]
}

Why?
InkoOs object I find this function and it’s has only 1 argument - path.
https://github.com/Komodo/KomodoEdit/blob/trunk/src/components/koOs.py#L384-L390

Note that when you are using Python through XPCOM you are not talking directly to the Python class, you are talking through an IDL interface, specifically this one:

https://github.com/Komodo/KomodoEdit/blob/trunk/src/components/koIOs.idl

In this case you could be using listDir like so:

var os = Components.classes["@activestate.com/koOs;1"].getService(Components.interfaces.koIOs);
var kodoc = komodo.koDoc;
var path = kodoc.file.dirName;
var dirlist = os.listdir(path, {});
var dirlist = os.listdir(path, {});

What are {} ?
void listdir(in wstring dir,out unsigned long count,[retval, array, size_is(count)] out wstring contents);
They are 2 out’s…
UPD:
First out return count of files/folders, second - object with names of files/folders?
I think I must create a tutorial about this. I don’t want to see that somebody has the same problem.
Also, this out’s is not important.