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

system.verbs.builtins.radio.file.getSubFolder

on getSubFolder (path, flcreate=true) {
	<<Changes
		<<5/1/01; 10:13:31 AM by DW
			<<Give me a forward-slash-separated path to a sub-folder of the www folder, and I will return a file system path with platform-specific separator characters, and you can be sure the folder exists.
	if not (path endswith "/") {
		path = path + "/"};
	local (folder = user.radio.prefs.wwwfolder + string.replaceall (path, "/", file.getpathchar ()));
	if flcreate {
		if not file.exists (folder) {
			file.surefilepath (folder + "xxx")}};
	return (folder)};
bundle { //test code
	dialog.alert (getSubFolder ("userland/images"))}



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.