CIRCNetwork.list Member

Syntax

object.list(word, file);

Arguments

ArgumentSummary
word
file

Returns

Remarks

See Also

Source Code

function my_list(word, file)
{
const NORMAL_FILE_TYPE = Components.interfaces.nsIFile.NORMAL_FILE_TYPE;
if (("_list" in this) && !this._list.done)
return false;
this._list = new Array();
this._list.string = word;
this._list.regexp = null;
this._list.done = false;
this._list.count = 0;
if (file)
{
var lfile = new LocalFile(file);
if (!lfile.localFile.exists())
{
// futils.umask may be 0022. Result is 0644.
lfile.localFile.create(NORMAL_FILE_TYPE, 0666 & ~futils.umask);
}
this._list.file = new LocalFile(lfile.localFile, ">");
}
if (isinstance(word, RegExp))
{
this._list.regexp = word;
this._list.string = "";
word = "";
}
if (word)
this.primServ.sendData("LIST " + fromUnicode(word, this) + "\n");
else
this.primServ.sendData("LIST\n");
return true;
}