There seem to be several different file/directory APIs , which CHDK doesn't use entirely consistently. I'd be interested to know what the reasoning is to use a particular one ? If there are situations where you shouldn't use the _Fut API, I'd particularly like to know about that.
My observation
*_Fut is the highest level, wraps calls to lower level functions with calls to Mounter... StartAccessFile_filesem, statcache etc. Generally seems to work. Most stdio file functions are #defined to use this in stdlib.h
capital letter Open etc are the functions called by fut. These mostly work, and are used in some cases by CHDK. open() in chdk actually calls Open. There is also *_FileStream called by the _Fut functions use that FILE*.
lower case (vxworks libc ?) often do not work.
In the current chdk
remove calls Remove rather than the equivalent Fut function, while rename (at least on a540) calls rename, which doesn't actually appear to work. mkdir calls a lower level function which works, but appears to return 0 on failure unlike most libc (not surprising since mkdir isn't even ANSI)
edit:
it appears that read and write (or Read and Write as they are known stubs_entry) should only be used with uncached memory.