in reply to Re: Re: Testing for existance of subdirectories
in thread Testing for existance of subdirectories
I would change that test to:
if ($attrib & 16) { return 1 }What you're doing is testing bit 4 of the file attributes, which is probably the "directory" bit. But if this was a read-only, hidden, etc directory, that $attrib would be something else, like 17.
If that doesn't make sense, here's a hint; ask if this isn't too clear:
You want to test this bit v 16 = 00010000b 17 = 00010001b ^
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Testing for existance of subdirectories
by ChrisNutting (Initiate) on Aug 19, 2001 at 15:06 UTC |