Talk:File IO: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
 
(getService or createInstance ?)
Line 1: Line 1:
ffff
<pre>var file = Components.classes["@mozilla.org/file/directory_service;1"].
createInstance(Components.interfaces.nsIProperties).
get("ProfD", Components.interfaces.nsIFile);</pre>
 
-- should that be getService or createInstance? I'd use getService and [http://www.google.com/search?&q=mozilla%20directory_service%20nsIProperties%20createInstance Google] [http://www.google.com/search?hl=en&lr=&c2coff=1&q=mozilla+directory_service+nsIProperties+getService&btnG=Search thinks] that both are possible.
 
[[User:Asqueella|Asqueella]] 08:19, 21 Dec 2004 (PST)~

Revision as of 16:19, 21 December 2004

var file = Components.classes["@mozilla.org/file/directory_service;1"].
	createInstance(Components.interfaces.nsIProperties).
	get("ProfD", Components.interfaces.nsIFile);

-- should that be getService or createInstance? I'd use getService and Google thinks that both are possible.

Asqueella 08:19, 21 Dec 2004 (PST)~