File Type

The file type is implemented by the classes FileMessage and FileParticle, which are derived from Message and Particle, respectively. It uses the reference-counting mechanism of the Message and Envelope classes to ensure that files are not deleted until no longer needed.

The File type adds the following functions to Message.

Constructors

FileMessage()

Create a new file message with a unique filename. By default, the file will be deleted if no file messages reference it.

FileMessage(const char* name)

Create a new file message with the given filename name. By default, the file will not be deleted if no file messages reference it.

FileMessage(const FileMessage& src)

Create a new file message containing the same filename as the given file message. By default, the file will not be deleted if no file messages reference it.

Operations

const char* fileName()

Return the filename contained in this message.

StringList print()

Return the filename contained in this message in a StringList object.

void setTransient(int transient)

Set the status of the file. If transient is TRUE, the file will be deleted if no file messages are reference it; if FALSE, it will not be deleted.