Home Contents | # rawio.access | Rawio | Core4 Lua Event System

## SYNOPSIS

#include <lua/errno.lh>
rawio.access(filename [, mode])

## DESCRIPTION

The rawio.access() function checks the accessibility of the file named by path for the access permissions indicated by mode.

The value of mode is a string that contains any combination of the letters 'r', 'w' or 'x'. The letter 'r' checks for read permission, 'w' checks for write permission and 'x' checks if a file can be executed or if a directory can be listed. The default value for mode is 'r'.

## RETURN VALUE

On success, returns true. On error, three values are returned: nil, a string describing the error (The result of the C library call strerror() on the errno code) and the errno number from the standard C library.

## SEE ALSO

rawio.attach, rawio:blocking, rawio:canReadLine, rawio:clearError, rawio:close, rawio:connect, rawio:detach, rawio:lastError, rawio:line, rawio:lines, rawio.open, rawio:read, rawio:copy, rawio.stat, rawio.statfs, rawio:writet, rawio:write