Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 802 Bytes

File metadata and controls

35 lines (22 loc) · 802 Bytes

nodejsscriptDocs


nodejsscript / s / test

Function: test()

test(option, path): boolean

Evaluates expression using the available primaries and returns corresponding value.

Parameters

option: TestOptions

Valid options: - -b: true if path is a block device; - -c: true if path is a character device; - -d: true if path is a directory; - -e: true if path exists; - -f: true if path is a regular file; - -L: true if path is a symbolic link; - -p: true if path is a pipe (FIFO); - -S: true if path is a socket

path: string

The path.

Returns

boolean

See option parameter.