Hi again! On 8 January 2013 14:56, Nicolai Scheer <nicolai.sch...@gmail.com> wrote:
> > Do you have any advice how I can move lill' pandora to an extension? Of > course I might copy the complete simple_file_wrapper, but I'd rather not do > it that way... I did not find any "add standard stream context > option"-stuff in the API... > > I did finish to write a small extension this evening, which does what I want :) I just saved a copy of the php_plain_files_wrapper struct, deregistered the file wrapper during my MINIT, injected my own functions into the struct and registered it again. My own functions just wrap the original ones (using the saved original function pointers), adjust STREAM_ASSUME_REALPATH and add the prefix if necessary. Adjustments only kick in for paths exceeding MAX_PATH, so if all paths are within the usually allowed bounds, everything is back to original. Quick and dirty, but it works very well and is a feasible way for our project... until there's a better way :) Greetings Nico