APPX Software Library

Chapter 4-8: Runtime Subroutine's and Predefined Processes

.FILE EXISTS

This subroutine is called to check if a file exists in the filesystem.

Usage:

Screen capture

Description:

This subroutine is called to check if a file exists in the filesystem. Both parameters are required, the subroutine will CANCEL if they are not received.

<exists?> is the result, indicating if file exists or not (Required). This must be PASSed with Share "Y". Returns Y if the file exists, N if not.

<pathname> is pathname to test (Required).

Notes:

The subroutine tries to open the file for Read access, and if it cannot, it returns a "N". It cannot distinguish between a file that does not exist and a file it cannot open due to file permissions, both cases will return "N".

You can also use this to test if a directory exists by passing a directory name (Unix/Linux only).