Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

isReadable

isReadable( 
S_name 
[ tl_path ] 
) 
=> t / nil

Description

Checks if you have permission to read a file or list a directory. Uses the current SKILL path for relative paths. A path that is anchored to the current directory, for example, ./, ../, or ../../.., and so on, is not considered as a relative path.

Arguments

S_name

Name of a file or directory you want to know your access permissions on.

tl_path

List of paths to override the SKILL path.

Value Returned

t

If S_name exists and you have permission to read it (for files) or list the contents (for directories).

nil

The file does not exist or does exist, but you do not have permission to read it.

Examples

Result if current working directory is readable.

isReadable("./") 
=> t

Result if "~/DACLib" is not readable or does not exist.

isReadable("~/DACLib") 
=> nil

Related Topics

infile

isExecutable

isFile

isWritable


Return to top
 ⠀
X