Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a wchar_t version of getcwd?

I am trying to this:

wchar_t buff[PATH_MAX];
wgetcwd( buff, PATH_MAX);

I have also tried _wgetcwd. Google suggests _wgetcwd is in dir.h, but i have never heard of such a header file.

I'm using GCC 4.3.

Thank you.

like image 814
mikbal Avatar asked Oct 19 '25 10:10

mikbal


1 Answers

If this is a Unix/Linux system there is no point in looking for a wchar_t version of getcwd. That is because all file names and directory names are just bytes with the exception of the '/' and '\0' characters. You can use UTF-8 encoding with them but the filesystem itself does not care.

like image 141
Zan Lynx Avatar answered Oct 21 '25 23:10

Zan Lynx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!