How to get file name on disk (sting thing on any OS)?

Whatever platform an application runs on (windows, linux, mac, etc), the way to visit file system is through OS API (e.g: windows API).

Take "get a file name" for example on windows, finally the name will be returned by a calling to windows API, which will return char* or wchar* for sure. If it's wchar*, it's UTF16 encoding. So if running a unicode application, it will get utf16 file name always on any routine.

 

Keep learning....

你可能感兴趣的:(File)