The File List
While scanning the input files, the C-library build a linked list. Each node is of type uulist (a C structure) and describes one file,
possibly composed of several parts. A resource corresponding to this type of structure was created. But the members of this
resource are not available in a php script. That’s why an object corresponding to this resource was also created. Naturally,
a function was also created to convert a uulist resource into a uulist object (php_uulistitemtoobject).
This page describes the members of the object :
- int state : Describes the state of this file. Either the value UUFILE_READ or a bitfield of the following integer constants :
- UUFILE_MISPART : The file is missing at least one part.
- UUFILE_NOBEGIN : No “begin” line was detected.
- UUFILE_NOEND : No “end” line was detected.
- UUFILE_NODATA : No encoded data was found within these parts.
- UUFILE_OK : This file appears to be okay, and decoding is likely to be successful.
- UUFILE_ERROR : A decode operation was attempted, but failed, usually because of an I/O error.
- UUFILE_DECODED : This file has already been successfully decoded.
- UUFILE_TMPFILE : The file has been decoded into a temporary file, which can be found using the binfile member (see below).
This flag gets removed if the temporary file is deleted.
- int mode : this is the file mode found or the default of 0644. A decode operation will try to restore this mode.
- int uudet : The type of encoding this file uses. May be 0 if UUFILE_NODATA or one of the following integer constants:
- UU_ENCODED : for uuencoded data,
- B64ENCODED : for Base64 encoded data,
- XX_ENCODED : for xxencoded data,
- BH_ENCODED : for BinHex data,
- PT_ENCODED : for plain-text data,
- QT_ENCODED : for MIME quoted-printable encoded text, or
- YENC_ENCODED : for yenc encoded data.
- int size : The approximate size of the resulting file. It is an estimated value and can be a few percent off the final value,
hence the suggestion to display the size in kilobytes only.
- string filename : The filename. This field may be NULL if state != UUFILE_OK.
- string subfname : A unique identifier for this group of parts.
- string mimetype : Stores this part’s “Content-Type” if available.
- string binfile : After decoding, this is the name of the temporary file the data was decoded to and stored in.
This value is non-NULL if the flag UUFILE_TMPFILE is set in the state member above.
- array haveparts : The part numbers found for this group of files as a zero-terminated ordered integer array.
Some extra care must be taken, because a file may have a 0th part as its first part. Thus if haveparts is zero,
it indicates a 0th part, and the list of parts continues. A file may have at most one 0th part, so if both haveparts
and haveparts are zero, the 0th part is the only part of this file.
- array misparts : Similar to haveparts; a zero-terminated ordered integer array of missing parts, or simply NULL if no parts are missing.