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

which

which( 
t_fileName 
) 
=> t_fullPath / nil 

Description

Returns the absolute path of the given context file, or regular file or directory.

The main usage of this function is to load prerequisite context files.

If t_fileName identifies a context file (that is with the .cxt extension), it looks under the standard contexts location (associated with the application in which this function is called), as well as common Cadence contexts directory, your_install_path/tools/dfII/etc/context, and user contexts location, youre_install_path/tools/dfII/local/context, for the presence of the context file.

If t_fileName identifies a regular file or directory, the current SKILL path is searched. A path that is anchored to the current directory, for example, ./, ../, or ../../.., and so on, is not considered as a relative path.

t_fileName should be a simple file or directory name, and should not contain directory separators.

Arguments

t_fileName

Name of a context file, or a regular file or directory that you want to get the absolute path.

Value Returned

t_fullPath

The absolute path of t_fileName.

nil

If t_fileName is not found.

Examples

Loading a prerequisite context file:

loadContext( which( "myPrereq.cxt" ) ) 
=> t

Get the absolute path of a file:

which( ".cdsinit" ) 
=> "/usr/deeptik/.cdsinit"

Related Topics

Input Output Functions

truename


Return to top
 ⠀
X