Builtins: Ranges
On this page
file_exists()#
file_exists(path)Check whether a file exists at an accessible path.
Returns: Boolean.
file_exists("user://preferences.json")directory_exists()#
directory_exists(path)Check whether a directory exists.
Returns: Boolean.
directory_exists("user://tutorial")range()#
range(stop) or range(start, stop, step = 1)Build integers starting at start (default 0) and ending before stop.
Returns: Array of integers.
range(1, 6)Negative steps count down. Step 0 fails. The builder has a 100,000-item safety limit.
range_inclusive()#
range_inclusive(start, finish, step = 1)Build a range that can include the finish value when reached by the step.
Returns: Array of integers.
range_inclusive(1, 5)An incompatible direction gives no values. A step that skips the endpoint does not invent an extra final value.
