there is a

Typeoperator
DictionaryLCS
LibraryLiveCode Script
Syntax
there is a {<object> | file <filePath> | folder <folderPath> | process <procName>}
Synonymsthere is an
Summary

Evaluates to true if the specified object, file, folder, or process exists, false otherwise.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
object

Any object reference.

filePath

The filePath specifies the name and location of a file you want to check. If you specify a name but not a location, LiveCode looks for the file in the defaultFolder.

folderPath

The folderPath specifies the name and location of a folder you want to check. If you specify a name but not a location, LiveCode looks for the folder in the defaultFolder.

procName

The name of any process that LiveCode started.

Example
there is a card button 1 -- evaluates to true if any card buttons exist
if there is a card ID 3445 then go card ID 3445
put (there is a file it) into fileIsThere
RelatedProperty: stackFiles, mode
Operator: there is no
Keyword: file
Object: stack
Function: exists
Glossary: property, loaded into memory, operator, precedence, folder, evaluate, process, object
Control Structure: function
Securitydisk, process
Description

Use the there is a operator to make sure an object or file exists before working with it, or to find out whether there are any objects of a specified type.

The there is a operator is the logical inverse of the there is no operator. When one is true, the other is false.

The expression there is a stack stackName evaluates to true if the stack is open, if it is closed but loaded into memory, or if it appears in the stackFiles property of any open stack.

Tip: To find out whether a stack is open, check its mode property. A stack that is loaded into memory but is not open has a mode of zero.

Note: The there is a operator is implemented internally as a function, and therefore has lower precedence than other operators.

Tagsfile system