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

isDir

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

Description

Checks if a path exists and if it is a directory name.

When S_name is a relative path, the current SKILL path is used if it’s non-nil. 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

Path you want to check.

tl_path

List of paths that overrides the SKILL path.

Value Returned

t

The name exists and it is the name of a directory.

nil

The name exists and is not the name of a directory or S_name does not exist at all.

Examples

Assumes DACLib is a directory and triadc is a file under the current working directory and the SKILL path is nil.

isDir("DACLib")  
=> t
isDir("triadc")  
=> nil

The following example returns nil if test does not exist.

isDir("test")   
=> nil

Related Topics

Environment Functions

getSkillPath


Return to top
 ⠀
X