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

system.verbs.apps.s3.testing.uploadFolder

local (folder = "Macintosh HD:Images for Testing:");
dotOpmlSuite.menuCommands.editLogOutline (); //open log outline
fileloop (f in folder, infinity) {
	local (startticks = clock.ticks ());
	if system.environment.isMac { //avoid Macintosh system files
		if file.filefrompath (f) beginswith "." {
			continue}};
	local (path = string.replaceall (f - folder, file.getpathchar (), "/"));
	local (url = s3.newObject ("/michegas/" + path, file.readwholefile (f)));
	local (sizestring = string.megabytestring (file.size (f)));
	log.addtooutline ("Upload: " + path + " (" + sizestring + ")", outlineUrl:url, startticks:startticks)}



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.