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


on sureFilePath (f) { <<make sure all the folders on the path to f exist
	<<10/31/97 at 1:23:10 PM by DW -- moved from toys.sureFilePath
	try { // fast exit if parent folder already exists
		if file.isFolder (file.folderFromPath (f)) {
			return (true)}};
	local (s = string (f), i, path = "", pc = file.getPathChar ());
	for i = 1 to string.countFields (s, pc) - 1 {
		path = path + string.nthField (s, pc, i) + pc;
		file.sureFolder (path)}}

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.