isFileName
isFileName(S_name[tl_path] ) =>t/nil
Description
Checks if a file or directory exists.
The file name can be specified with either an absolute path or a relative path. In the latter case, current SKILL path is used if it’s not nil. Only the presence or absence of the name is checked. If found, the name can belong to either a file or a directory. isFileName differs from isFile in this regard. A path that is anchored to the current directory, for example, ./, ../, or ../../.., and so on, is not considered as a relative path.
Arguments
Value Returned
Examples
Suppose DACLib is a directory and triadc is a file in the current working directory and the SKILL path is nil.
isFileName("DACLib")
=> t
A directory is just a special kind of file.
isFileName("triadc")
=> t
Result if triad1 does not exist in current working directory.
isFileName("triad1")
=> nil
isFileName( ".cshrc" list("." "~"))
=> t
Related Topics
Return to top