node.js - how can I write file to windows system folder? -


i want add new fonts windows system folder electron, failed, how this? here code can work in app folder.i want put file in 'c:\windows\fonts', thank u.

var request = http.get("http://www.mysites.com/newfont.ttf", function(response) {  		if (response.statuscode === 200) {  			var file = fs.createwritestream("app/font.ttf");  			response.pipe(file);  		}  	});

in error can see http not defined, tell you forget require http module. way have same thing fs module no ?


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -