Internationalization and localization tools


File and Path Function

int access(const char *path, int mode);

int _access(const char *path, int mode);

int _waccess(const wchar_t *path, int mode);

int _taccess(const TCHAR *path, int mode);

Internationalization (I18n) Function Overview

The access function returns 0 if the file pointed to by path has the given mode; otherwise, it returns -1 and sets the global errno variable.

On Windows platforms, use _access, which is the equivalent of access.

_waccess is the wide character version of _access; its path argument is a wide-character string. This function is only supported on Windows platforms; there is no ANSI wide-character function.

_taccess is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _access or _waccess.

I18n Issues

Use the appropriate version of the function as required for internationalization support, noting the following:

On ANSI UTF-16 platforms, use a conversion function to convert the wide-character string to a multibyte-character string and then call access.

See Pathnames for a discussion of path and filename considerations in an internationalized application, and File I/O, which addresses reading and writing non-ASCII text data files.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

File and Path Functions

 

Lingoport internationalization and localization services and software