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

isFile

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

Description

Checks if a file exists and that it is not a directory.

Identical to isFileName, except that directories are not viewed as (regular) files. 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

Path you want to check.

tl_path

List of paths that overrides the SKILL path.

Value Returned

t

The S_name file exists.

nil

The S_name file does not exist.

Examples

Assumes DACLib is a directory and triadc is a file in the current working directory and the SKILL path is nil. A directory is not viewed as a file in this se.

isFile( "DACLib") 
=> nil
isFile( "triadc") 
=> t
isFile( ".cshrc" list("." "~"))
=> t

Related Topics

isFileName

getSkillPath


Return to top
 ⠀
X