| Function group | Execute on client | Platform(s) |
| FileOps | NO | All |
FileOps.$doesfileexist(cPath)
Returns true if the file or folder named cPath exists. Otherwise, it returns false.
Switchplatform(()Case'X'## for macOSDoFileOps.$doesfileexist('/Users/omnis/welcome/tutorial/mylib.lbs')ReturnslStatusCase'U'## for LinuxDoFileOps.$doesfileexist('/omnis/welcome/tutorial/mylib.lbs')ReturnslStatusDefault## for WindowsDoFileOps.$doesfileexist('c:\omnis\welcome\tutorial\mylibs.lbs')ReturnslStatus
End Switch# lStatus is true if 'mylib.lbs' exists in the Omnis tutorial
# For macOS, to convert legacy HFS file paths to POSIX for use with functions such as $doesfileexist use:
DoFileOps.$converthfspathtoposixpath('HD:Users:omnis:welcome:tutorial:mylib.lbs',lPosixPath)
# For macOS, to convert a POSIX path back to HFS use:
DoFileOps.$convertposixpathtohfspath('/Users/omnis/welcome/tutorial/mylib.lbs',lHfsPath)