I can check if a folder is empty.
this.emptyfolder = function(folderid) {
result = PlacesUtils.getFolderContents(folderid);
resultContainerNode = result.root;
if (resultContainerNode.ChildCount == 0) {
return true;
} else {
return false;
}
}
How to check if a folder exists even if it's empty?