$exists » History » Version 1
Per Amundsen, 08/06/2015 03:52 AM
| 1 | 1 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | *$exists(file|dir)* |
||
| 4 | |||
| 5 | Returns [[$true]] if a file or dir exists otherwise [[$false]]. |
||
| 6 | |||
| 7 | _See also [[$isfile]] [[$isdir]]._ |
||
| 8 | |||
| 9 | *Parameters* |
||
| 10 | |||
| 11 | file|dir - File or directory. |
||
| 12 | |||
| 13 | *Example* |
||
| 14 | |||
| 15 | <pre> |
||
| 16 | ; Check if file exists |
||
| 17 | if ($exists(c:\windows\notepad.exe) file exists |
||
| 18 | |||
| 19 | ; Check if directory exists |
||
| 20 | if ($exists(c:\windows) directory exists |
||
| 21 | </pre> |