On Feb 7, 2015, at 10:17 AM, Robert Stoll wrote:
Nah... ignore that it will return true if an dir is empty but the
problem is in this line:
if(is_dir($_x))
It should be
If(is_dir($_dir.'/'.$_x))
Hope this fixes your bug
Cheers,
Robert
The problem is that everything appears to be working accept that
there are directories with subdirectories that are being ignored.
I if I needed to do
If(is_dir($_dir.'/'.$_x))
instead of
if(is_dir($_x))
I would get an entry in the self::$_readError array because the path
info
would be bad. I would assume that if the dir was successfully opened for
read to begin with, when the readdir code saw $_x it would already have
the necessary path info. But the screen method wouldn't so it is passed
to that method.
I set up a demo on my site and I hope that this is acceptable to include
in a posting to this list. It is not intended to be an advertisement
but can
appear to be.
jekillen.com/demos -> Mock Terminal -> Recursive Dev
In the page at Recursive Dev there is a link to "High liter" in which
the relevant code will be highlighted.
The mock terminal demo is a stripped down version of a project I am
working on. There is a listing feature that can be used to list
directories
in emulating a terminal call to ls -la, with a few extras. With this you
should be able to see a listing of the directories that the code this
issue
is about won't include in its out put. Mock Teminal is predominantly a
javascript application on the client side, so have it active and use
a DOM browser, as I haven't added IE code yet.
this is the output on the recursive demo installation
There should be: /terminal/lab_3/jsLab_1 and /terminal/lab_3/jsLab_2
which are being skipped
There are also two sub dirs in /terminal/php that are not being
included in the output.
/terminal/img
/terminal/lab_2
/terminal/lab_2/img
/terminal/lab_2/php
/terminal/lab_2/css
/terminal/lab_2/js
/terminal/lab_5
/terminal/lab_5/img
/terminal/lab_5/php
/terminal/lab_5/css
/terminal/lab_5/js
/terminal/php
/terminal/dist
/terminal/css
/terminal/templates
/terminal/lab_0
/terminal/lab_0/img
/terminal/lab_0/php
/terminal/lab_0/css
/terminal/lab_0/js
/terminal/lab_3
/terminal/lab_3/img
/terminal/lab_3/php
/terminal/lab_3/css
/terminal/lab_3/js
/terminal/lab_4
/terminal/lab_4/img
/terminal/lab_4/php
/terminal/lab_4/css
/terminal/lab_4/js
/terminal/js
/terminal/lab_1
/terminal/lab_1/img
/terminal/lab_1/php
/terminal/lab_1/css
/terminal/lab_1/js
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php