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

isExecutable

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

Description

Checks if you have permission to execute a file or search a directory.

A directory is executable if it allows you to name that directory as part of your path in searching files. It 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 the file or directory you want to check for execution/search permission.

tl_path

List of paths that overrides the SKILL path.

Value Returned

t

If you have permission to execute the file or search the directory specified by S_name.

nil

The directory does not exist or you do not have the required permissions.

Examples

isExecutable("/bin/ls")      
=> t
isExecutable("/usr/tmp")     
=> t

The following example returns nil if attachFiles does not exist or is non-executable.

isExecutable("attachFiles")  
=> nil

Related Topics

isFile

isReadable

isWritable


Return to top
 ⠀
X