Tuesday, August 18, 2009 at 7:54 PM.

howtoSuite.server.saveStaticFile

on saveStaticFile (filetext, filepath) {
	<<Changes
		<<6/2/08; 3:04:44 PM by DW
			<<Save a static file via FTP instead of a local file write. Cribbed from newsJunk.root.
	local (username = user.howto.prefs.server.ftp.username, password = user.howto.prefs.server.ftp.password);
	local (connection = tcp.ftp.openConnection (user.howto.prefs.server.ftp.server, username, password));
	tcp.ftp.writefile (connection, filetext, user.howto.prefs.server.ftp.path + filepath);
	tcp.ftp.closeConnection (connection)}
<<bundle //test code
	<<scratchpad.result = saveStaticFile ("Take me home, country road...", "tmp/test.txt")



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.