Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

Files.DirectoryExists

Checks whether a directory exists with the given path.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Files 2.7 Yes Yes Yes Yes Yes

MBS( "Files.DirectoryExists"; Path )

Parameters

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

Result

Returns 1 if directory exists and 0 if not.

Description

Checks whether a directory 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 directory exists:

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

See also

Example Databases


Files.DeleteFolder   -   Files.DiskInfo

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins