Re: File bug and Mime_Mail extension
| From: | Tomas V.V.Cox | Date: | Thu, 16 May 2002 16:43:46 +0000 |
| Subject: | Re: File bug and Mime_Mail extension | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-6155@lists.php.net to get a copy of this message | ||
El jue, 16-05-2002 a las 18:22, Wolfram Kriesing escribió:
> a problem with "File::readAll( remote file )" on a remote file:
> the method File::_getFilePointer checks the following
>
> // Check it exists
> if (FILE_MODE_READ == $mode AND !file_exists($filename)) {
> return PEAR::raiseError('File does not exists: ' .
> $filename);
>
> but file_exists doesnt work on remote files, as i need it to extend the
> Mail_Mime class to work with remote files too.
> what i am planning is to use the following in the Mail_Mime class:
> File::readAll( $filename )
> instead of the current
> $fd = fopen( $filename )
> fread( $fd , filesize($filename) ); // here filesize doesnt work on
> remote files
> but neither works yet :-(
Just for kidding a little:
$contents = &System::cat($filename);
works on all kind of files accepted by fopen and the read is done by
chunks :-)
>
> or - i had once written a pear-compatible file class which simply
> abstracts all file-functionality and makes it work on remote files as well,
> shall this one be commited too?
Wolfram, please why not add the functionality you want to File? You
could of course become a developer of the File package if it's (or not)
a credits problem.
Tomas V.V.Cox