src/PEAR/Installer.php
function addFileOperation($type, $data)
    {
        if (!is_array($data)) {
            return $this->raiseError('Internal Error: $data in addFileOperation'
                . ' must be an array, was ' . gettype($data));
        }

        if ($type == 'chmod') {
            $octmode = decoct($data[0]);
            $this->log(3, "adding to transaction: $type $octmode $data[1]");
        } else {
            $this->log(3, "adding to transaction: $type " . implode(" ", $data));
        }
        $this->file_operations[] = array($type, $data);
    }
function addFileOperation($type, $data)
    {
        if (!is_array($data)) {
            return $this->raiseError('Internal Error: $data in addFileOperation'
                . ' must be an array, was ' . gettype($data));
        }

        if ($type == 'chmod') {
            $octmode = decoct($data[0]);
            $this->log(3, "adding to transaction: $type $octmode $data[1]");
        } else {
            $this->log(3, "adding to transaction: $type " . implode(" ", $data));
        }
        $this->file_operations[] = array($type, $data);
    }
Add a file operation to the current file transaction.

@see startFileTransaction()
@param string $type This can be one of:
- rename:  rename a file ($data has 3 values)
- backup:  backup an existing file ($data has 1 value)
- removebackup:  clean up backups created during install ($data has 1 value)
- chmod:   change permissions on a file ($data has 2 values)
- delete:  delete a file ($data has 1 value)
- rmdir:   delete a directory if empty ($data has 1 value)
- installed_as: mark a file as installed ($data has 4 values).
@param array $data For all file operations, this array must contain the
full path to the file or directory that is being operated on.  For
the rename command, the first parameter must be the file to rename,
the second its new name, the third whether this is a PHP extension.

The installed_as operation contains 4 elements in this order:
1. Filename as listed in the filelist element from package.xml
2. Full path to the installed file
3. Full path from the php_dir configuration variable used in this
installation
4. Relative path from the php_dir that this file is installed in