Monday, November 08, 2010 at 12:03 AM.

system.verbs.builtins.html.ftp.upload

on upload (f, host, directory, userName, password) {
	if not (directory endsWith "/") {
		directory = directory + "/"};
	local (path = directory + file.fileFromPath (f));
	case sys.os () {
		"MacOS" {
			ftpClient.launch ();
			try { //4.1b7
				ftpClient.store (f, host, path, userName, password)}
			else {
				if tryError contains "memory" {
					scriptError (tryError)}
				else {
					ftpClient.sureFilePath (host, path, username, password); //4.1b4
					ftpClient.store (f, host, path, userName, password)}}};
		"Win95";
		"WinNT" {
			scriptError ("Can't upload via FTP because it's not yet supported by Frontier for Windows.")}}}



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.