/** * Appends the provided data to the file * * If a filesystem transaction is in progress and is rolled back, this * data will be removed. * * @param mixed $data The data to append to the file * @return fFile The file object, to allow for method chaining */ public function append($data) { $this->tossIfDeleted(); if (!$this->isWritable()) { throw new fEnvironmentException('This file, %s, can not be appended because it is not writable', $this->file); } // Allow filesystem transactions if (fFilesystem::isInsideTransaction()) { fFilesystem::recordAppend($this, $data); } file_put_contents($this->file, $data, FILE_APPEND); return $this; }