MoshiachNow
IS-IT--Management
Hi,
Unzipping from a zip file,I need to establish if the member is a directory or a file.
The following code does not seem to do it it for me,the result is always ZERO (a file..).
Appreciate any advise:
$zip = Archive::Zip->new();
die if $zip->read( $filename1 ) != AZ_OK;
if (Archive::Zip::Member->isDirectory($NAME)) {
do something ...
I have also tried:
if ($zip->isDirectory($NAME)) {
$NAME passed can be directory or a file,and I expect "1" if it's a directory.
The exit code from the above is always Zero ...Why ?
Surely something is wrong with my syntax.
Thanks
Long live king Moshiach !
Unzipping from a zip file,I need to establish if the member is a directory or a file.
The following code does not seem to do it it for me,the result is always ZERO (a file..).
Appreciate any advise:
$zip = Archive::Zip->new();
die if $zip->read( $filename1 ) != AZ_OK;
if (Archive::Zip::Member->isDirectory($NAME)) {
do something ...
I have also tried:
if ($zip->isDirectory($NAME)) {
$NAME passed can be directory or a file,and I expect "1" if it's a directory.
The exit code from the above is always Zero ...Why ?
Surely something is wrong with my syntax.
Thanks
Long live king Moshiach !