fork of Russ Cox's code.google.com/p/rsc/appfs