(PHP 4)

php_uudecodetotemp -- Decodes a uulist resource into a temporary file.


int php_uudecodetotemp (resource item)

This function decodes the given item (uulist resource) of the file list and places the decoded output into a temporary file. This is intended to allow "previews" of an encoded file without copying it to its final location. The name of the temporary file can be retrieved afterwards by re-retrieving the node of the file list object (using php_uulistitemtoobject) and looking at its binfile member.

UURET_OK is returned upon successful completion. Most other error codes can occur as well. UURET_NODATA is returned if you try to decode parts without encoded data or with a missing beginning (uuencoded and xxencoded files only) of course, this condition would also have been obvious from the state value of the file list object (using php_uulistitemtoobject).

The setting of UUOPT_DESPERATE changes the behavior if an unexpected end of file was found (usually meaning that one or more parts are missing). Normally, the parlially-written target file is removed and the value UURET_NOEND is returned. In desperate mode, the same error code is returned, but the target file is not removed.

The target file is removed in all other error conditions.

Piscines en bois