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

isWritable

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

Description

Checks if you have permission to write to a file or update a directory. 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 a file or directory you want to find out your write permission on.

tl_path

List of paths to search that overrides the SKILL path.

Value Returned

t

If S_name exists and you have permission to write or update it.

nil

The file does not exist or does exist, but you do not have permission to read it.

Examples

isWritable("/tmp")
=> t

Result if out.1 does not exist or there is no write permission to it.

isWritable("~/test/out.1") 
=> nil

Related Topics

isFile

isExecutable

isReadable


Return to top
 ⠀
X