Re: more manual comments
| From: | Gabor Hojtsy | Date: | Wed, 14 Aug 2002 21:41:13 +0000 |
| Subject: | Re: more manual comments | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-11977@lists.php.net to get a copy of this message | ||
> 1. <http://www.php.net/manual/en/class.dir.php>
>
> lists three methods 'read, rewind, close'
>
> a. Searching on 'close' or 'close()' or 'read' or
> 'read()' in
> the "lookup" field yields nothing!
> while "rewind" only goes to rewinding a file. Is that right?
Why you searched for them, all the functions metioned are links,
just click on them...
> b. Maybe it would be a good idea to comment on the
> value/importance/necessity of using a close() with with
> dir() ? -- it seems that many of the user-contributed
> examples do not do so.
They may not be that important. AFAIK all resources are freed/closed
as the script exits, so this is why mysql connections are often not
closed...
> 2. <http://www.php.net/manual/en/function.is-dir.php>
>
> User contributions needs to condense the multiple posts of
>
> james.elkins@usinfotel.com
> 17-Jul-2002 01:05
All notes were buggy. They just don't seem to read documentation.
It explicitly states that the path needs to be relative to the
current directory. The notes showed that if it would be a bug, while
it's the correct behaviour. I deleted all notes (except the first
one about win swap files).
> 3. <http://www.php.net/manual/en/function.readdir.php>
>
> a. This page lists an 'official' example of listing files in a directory.
> Maybe the user comments that also give examples for this function
> on the following pages in the Filesystem section:
>
> <http://www.php.net/manual/en/function.is-dir.php>
> <http://www.php.net/manual/en/ref.filesystem.php>
>
> and the Directories section
>
> <http://www.php.net/manual/en/class.dir.php>
>
> should have a link to:
>
> <http://www.php.net/manual/en/function.readdir.php>
Dir has a link (the function name I mentioned above).
> b. Example 1 lists a right and wrong way, but it would be helpful to know
why it is
> right/wrong.
It's explained above the examples.
> c. Maybe some comment on this method of opendir/readdir vs. the read()
method used by
> some of the other user contributions?
It's simply user preference. Object based vs function based programming...
I don't know of any real differences.
Goba [one webmaster@php.net]