Check that file exists: Difference between revisions

Content added Content deleted
m (Spelling/grammar/aesthetics)
Line 140: Line 140:
sys_file_exists('/docs') =>
sys_file_exists('/docs') =>


Note that the above literally checks for existence. Namely sys_file_exists
Note that the above literally checks for existence. Namely sys_file_exists returns true if file exists but can not be read.
returns true if file exists but can not be read.


The only sure method to check if file can be read is to try to open it.
The only sure method to check if file can be read is to try to open it. If one just wants to check if file is readable the following may be useful:
If one just want to check if file is readable the following may be usefull:


;;; Define an auxilary function, returns boolean
;;; Define an auxilary function, returns boolean