Tux file retrieval module
"Robin Schuil" <[email protected]>
| Newsgroups | gmane.network.tux |
|---|---|
| Message-ID | <000801c33998$569e1a00$9600000a@robin> |
I need to write a module for Tux which can do the following: When the URL http://yourhost/path/to/image.jpg (or something like http://yourhost/mod.tux?/path/to/image.jpg) is requested by the user Tux needs to check if the file exists. If it does then just send it to the user the way it would be without any extra module. If the file doesn't exist, try to copy it (using a "cp -p source destination", maintaining timestamp etc.) to the document root and the resume the normal process (output it to the user if it exists now, otherwise return a 404). Could someone help me getting started? I've read the documentation about modules and I've been playing around a little. However, my C skills are bad and I need to get through this. Your help is really appreciated! Kind regards, Robin Schuil