Check that file exists: Difference between revisions
Content added Content deleted
Line 1,683: | Line 1,683: | ||
<lang PicoLisp>(if (info "file.txt") |
<lang PicoLisp>(if (info "file.txt") |
||
(prinl "Size: " (car @) " bytes, last modified " (stamp (cadr @) (cddr @))) |
(prinl "Size: " (car @) " bytes, last modified " (stamp (cadr @) (cddr @))) |
||
(prinl "File doesn't exist") ) |
(prinl "File doesn't exist") ) |
||
# for directory existing |
|||
# Nehal-Singhal 2018-05-25 |
|||
(if (info "./docs") |
|||
(print 'exists) |
|||
(print 'doesNotExist))) |
|||
</lang> |
|||
=={{header|Pike}}== |
=={{header|Pike}}== |
||
<lang pike>import Stdio; |
<lang pike>import Stdio; |