Page 1 of 1
[Done]GetCurrentDirectory() - wrong constants
Posted: Wed Feb 21, 2024 8:01 pm
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)
Re: GetCurrentDirectory() - wrong constants
Posted: Wed Feb 21, 2024 8:24 pm
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).
Re: GetCurrentDirectory() - wrong constants
Posted: Sat Mar 02, 2024 7:33 pm
by Andre
Thanks for your suggestions.
But Fred should confirm, what's the intended behavior first, before I adapt the docs...
Re: GetCurrentDirectory() - wrong constants
Posted: Sat Jun 29, 2024 9:04 pm
by MGD
I'm also unclear on this, and as far as I can tell, these are not described in the documentation anywhere beyond
Code: Select all
Specific OS path separator characters are available #PS, #NPS, #PS$ ('\') and #NPS$ ('/').
(looks like there links have never been completed)
and the changelog:
Code: Select all
- Added: #PS, #NPS, #PS$ and #NPS$ constants (Path separator character depending of the OS)