nsBookmarksService::WriteBookmarks(nsFileSpec *bookmarksFile, nsIRDFDataSource *ds, nsIRDFResource *root)
nsBookmarksService::WriteBookmarks(nsIRDFDataSource *ds, nsIRDFResource *root)
nsBookmarksService::WriteBookmarks(nsFileSpec *bookmarksFile, nsIRDFDataSource *ds,				   nsIRDFResource *root){	if (!bookmarksFile)	return(NS_ERROR_NULL_POINTER);	if (!ds)		return(NS_ERROR_NULL_POINTER);	if (!root)		return(NS_ERROR_NULL_POINTER);	nsresult			rv;	nsCOMPtr<nsISupportsArray>	parentArray;	if (NS_FAILED(rv = NS_NewISupportsArray(getter_AddRefs(parentArray))))		return(rv);	rv = NS_ERROR_FAILURE;	nsOutputFileStream	strm(*bookmarksFile);	if (strm.is_open())	{		strm << "<!DOCTYPE NETSCAPE-Bookmark-file-1>\n";		strm << "<!-- This is an automatically generated file.\n";		strm << "It will be read and overwritten.\n";		strm << "Do Not Edit! -->\n";		// Note: we write out bookmarks in UTF-8		strm << "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">\n";		strm << "<TITLE>Bookmarks</TITLE>\n";		strm << "<H1>Bookmarks</H1>\n\n";		rv = WriteBookmarksContainer(ds, strm, root, 0, parentArray);		mDirty = PR_FALSE;	}	return(rv);}