[Implemented] SetCurrentDirectory() return value.

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

[Implemented] SetCurrentDirectory() return value.

Post by luis »

If it's not a big problem, can you please return a meaningful value from the SetCurrentDirectory() procedure ?

1 for successful, 0 for not.

After all, it's not returning a value (well it does but not documented and not reliably), when usually a proc do so. And the change requested can fail for a number of reasons.

Sometimes could be possible to check if the dir is changed to the desired one with GetCurrentDirectory(), even if would be nice to know the result in advance.

In other cases, it's possible to have to do something like

SetCurrentDirectory("..\one\two")

and in that case a check with GetCurrentDirectory() could be troublesome, because I could not know where I should be. I would have to parse the "..\one\two" and do some reasoning.

In short, SetCurrentDirectory() can fail, I would like to know that like I do with many other procedures.

If possible, thank you.