src/Archive/Tar.php
function addString($p_filename, $p_string, $p_datetime = false)
    {
        $v_result = true;

        if (!$this->_isArchive()) {
            if (!$this->_openWrite()) {
                return false;
            }
            $this->_close();
        }

        if (!$this->_openAppend())
            return false;

        // Need to check the get back to the temporary file ? ....
        $v_result = $this->_addString($p_filename, $p_string, $p_datetime);

        $this->_writeFooter();

        $this->_close();

        return $v_result;
    }
function addString($p_filename, $p_string, $p_datetime = false)
    {
        $v_result = true;

        if (!$this->_isArchive()) {
            if (!$this->_openWrite()) {
                return false;
            }
            $this->_close();
        }

        if (!$this->_openAppend())
            return false;

        // Need to check the get back to the temporary file ? ....
        $v_result = $this->_addString($p_filename, $p_string, $p_datetime);

        $this->_writeFooter();

        $this->_close();

        return $v_result;
    }
This method add a single string as a file at the
end of the existing archive. If the archive does not yet exists it
is created.

@param string $p_filename A string which contains the full
filename path that will be associated
with the string.
@param string $p_string   The content of the file added in
the archive.
@param int    $p_datetime A custom date/time (unix timestamp)
for the file (optional).

@return true on success, false on error.
@access public