Checks whether a file existsint sm_file_exists (char *path);
- Specifies the file to check. In three-tier applications, the path can include a file access server ID in this format:
If you omit
server-id, Panther looks for the file locally.
sm_file_existslets you ascertain whether a file exists. In a three-tier environment, you can check a file on a remote file access server by prefixing the file path with the server ID.
For example, this JPL verifies the existence of file
oakbefore moving it to the local machine:if sm_file_exists("oak!/disk/reports/rpt.out")
call sm_file_move \
("oak!/disk/reports/rpt.out", "c:\reports\rpt.out", "b")
Note: On file systems that allow file-level permissions,
sm_file_existsonly verifies the existence of files for which the user has read permission.
sm_file_copy, sm_file_move, sm_file_remove