Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

Files.ItemExists

Checks whether a item exists with the given path.

Component Version macOS Windows Linux Server iOS SDK
Files 2.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Files.ItemExists"; Path )   More

Parameters

Parameter Description Example
Path Native path to the item to check. "C:\Windows"

Result

Returns 1 if item exists and 0 if not.

Description

Checks whether a item exists with the given path.
If item exists at the path Files.itemExists returns 1. If it's a directory, Files.DirectoryExists also returns 1 and Files.FileExists returns 0. With a file, Files.FileExists returns 1 and Files.DirectoryExists returns 0.
This function needs a native path. Please use Path.FileMakerPathToNativePath function in order to convert a FileMaker style path to a native path.

Examples

Checks whether item exists:

Set Variable [$r; Value:MBS( "Files.ItemExists"; "/Users/cs/Desktop/test.rtf")]

See also

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 18th October 2016


Files.IsReadOnly - Files.Launch

💬 Ask a question or report a problem