PHP streams and stat/stat_url function
| From: | Edward Rudd | Date: | Sun, 25 May 2003 20:00:24 +0000 |
| Subject: | PHP streams and stat/stat_url function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-148925@lists.php.net to get a copy of this message | ||
with a PHP Stream, when are the stat functions called??
the php_stream_wrapper_ops structure's stat and stat_url members and
php_stream_ops structure's stat member.
Right now I have a php wrapper that wraps around the PhysFS libraru
(http://www.icculus.org/physfs/) And I would like to be able to implement
stat functions so in my PHP code I can check whether a file exists or if
it's a directory.. This wrapper is registered as physfs:// AND overrides
the php_plain_files wrapper so I can use regular paths and they will ALL
be forced to access the physfs system.. (I un-static'ed the structure in
main/streams.c so I could "illegally" override the members with my module.
. It's for use in an embedded game scripting engine..soo.)
right now I have enough implemented so opening files,directories,
includes and requires all go through the physfs wrapper. Just is_dir,
is_file, etc.. don't go through the wrapper and I would like to figure out
how to make them...
Also, what is the cast member of the stream_ops for??
Edward Rudd