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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -