FileOps.$doesfileexist()

Function group Execute on client Platform(s)
FileOps NO All

Syntax

FileOps.$doesfileexist(cPath)

Description

Returns true if the file or folder named cPath exists. Otherwise, it returns false. Pathnames can be over 255 characters, which was the limit in Studio 8.0.1 or earlier.

Example

Switch platform()
  Case 'X' ;; for macOS
    Do FileOps.$doesfileexist(‘/Omnis/Tutorial/mylibs.lbs') Returns lStatus
  Case 'U' ;; for Linux
    Do FileOps.$doesfileexist('/omnis/tutorial/mylib.lbs') Returns lStatus
  Default ;; for Windows
    Do FileOps.$doesfileexist('c:\omnis\tutorial\mylibs.lbs') Returns lStatus
End Switch
; lStatus is true if 'mylib.lbs' exists in the Omnis tutorial