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

deleteDir

deleteDir( 
S_name 
) 
=> t / nil 

Description

Deletes the specified directory. The directory name can be specified with either an absolute or relative path; the SKILL path is used in the latter case. 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 directory to delete.

Value Returned

t

The directory is successfully deleted.

nil

The directory does not exist.

Reports an error if you do not have permission to delete a directory or the directory you want to delete is not empty.

Examples

Reports an error about permission violation.

createDir("/usr/tmp/test") 
=> t
deleteDir("/usr/tmp/test") 
=> t
deleteDir("/usr/bin")

Assuming there are some files in ~, reports an error that the directory is not empty.

deleteDir("~") 

Related Topics

Environment Functions

createDir

deleteFile


Return to top
 ⠀
X