GetCurrentDirectory() - wrong constants

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

Lebostein
Addict
Addict
Posts: 807
Joined: Fri Jun 11, 2004 7:07 am

GetCurrentDirectory() - wrong constants

Post by Lebostein »

Returns the full path of the current directory. It will end with a directory separator ('\', #PS, #PS$ for Windows or '/', #NPS, #NPS$ otherwise)
Wrong. Whatever the system is, the path will always end with #PS$, never with #NPS$! Please remove the mention of #NPS$ here.
The directory separator is allways #PS$. #NPS$ means the "wrong" separator on your system.

Same thing on following sites:

GetUserDirectory()
GetHomeDirectory()
GetCurrentDirectory()
GetTemporaryDirectory()

I would write it in this way:
Returns the full path of the current directory. It will end with a path separator #PS, #PS$ ('\' for Windows or '/' otherwise)
Edit: "path" separator is better then "directory" separator ("PS" means "path separator" I think)
Last edited by Lebostein on Wed Feb 21, 2024 8:34 pm, edited 4 times in total.
Lebostein
Addict
Addict
Posts: 807
Joined: Fri Jun 11, 2004 7:07 am

Re: GetCurrentDirectory() - wrong constants

Post by Lebostein »

Specific OS path separator characters are available #PS, #NPS, #PS$ ('\') and #NPS$ ('/').
That is also wrong, I think (FileSystem, ExamineDirectory(), SetCurrentDirectory()).

Should be
Specific OS path separator characters are available #PS, #PS$ ('\' for Windows or '/' otherwise). With #NPS, #NPS$ the negated path separator is obtained ('/' for Windows or '\' otherwise).
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2071
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: GetCurrentDirectory() - wrong constants

Post by Andre »

Thanks for your suggestions.
But Fred should confirm, what's the intended behavior first, before I adapt the docs...
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply