lib/bagit_fetch.php
public function write()
    {
        $lines = array();

        foreach ($this->data as $fetch) {
            $data = array($fetch['url'], $fetch['length'], $fetch['filename']);
            array_push($lines, join(' ', $data) . "\n");
        }

        if (count($lines) == 0) {
            if (file_exists($this->fileName)) {
                unlink($this->fileName);
            }
        } else {
            writeFileText($this->fileName, $this->fileEncoding, join('', $lines));
        }
    }
public function write()
    {
        $lines = array();

        foreach ($this->data as $fetch) {
            $data = array($fetch['url'], $fetch['length'], $fetch['filename']);
            array_push($lines, join(' ', $data) . "\n");
        }

        if (count($lines) == 0) {
            if (file_exists($this->fileName)) {
                unlink($this->fileName);
            }
        } else {
            writeFileText($this->fileName, $this->fileEncoding, join('', $lines));
        }
    }
public function write ( ) { $ lines = array ( ) ; foreach ( $ this -> data as $ fetch ) { $ data = array ( $ fetch [ 'url' ] , $ fetch [ 'length' ] , $ fetch [ 'filename' ] ) ; array_push ( $ lines , join ( ' ' , $ data ) . "\n" ) ; } if ( count ( $ lines ) == 0 ) { if ( file_exists ( $ this -> fileName ) ) { unlink ( $ this -> fileName ) ; } } else { writeFileText ( $ this -> fileName , $ this -> fileEncoding , join ( '' , $ lines ) ) ; } }
This writes the data to the fetch file.

@return void
This writes the data to the fetch file .