Sign in to follow this  
Followers 0
jpm

_FileListToArray returns array[0]=0

4 posts in this topic

It think the coding will be much easier if the return would be always an array with the first element being 0 if no file /dir was found.

The @error will differentiate which kind of error occurs.

The loop 1 to array[0] will do no loop execution.

PS Looking at the code make the checking of the '.' or '..' dir useless in the beta as the FileFindNextfile is not returning anymore such dir.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

It think the coding will be much easier if the return would be always an array with the first element being 0 if no file /dir was found.

The @error will differentiate which kind of error occurs.

The loop 1 to array[0] will do no loop execution.

I tried to make it follow the same standard as the built in funcs which according to the comment below from the IniReadSectionNames() documentation is to not to create an array if nothing is found.

The number of elements returned will be in $result[0]. If an @error occurs, no array is created.

PS Looking at the code make the checking of the '.' or '..' dir useless in the beta as the FileFindNextfile is not returning anymore such dir.

I will change this and submit it to JDEB for inclusion in the next version.

-SolidSnake

P.S. Thanks for the feedback.

Edit:Done. Sent updated version to JDEB

Edited by SolidSnake

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Where did you sent it to ? Its not in my PM or Email inbox......

Sorry It did not get to you. I just sent it again to your PM inbox

-SolidSnake

Edited by SolidSnake

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0