Skip to main content

# Check Path Existence (LCC.web_file.exists)

## Signature​

    type_or_false = LCC.web_file.exists(path, timeout?)

## Parameters​

- path
  String. File or directory to check.
- timeout
  Number, optional. Request timeout in seconds, default `60`.

## Returns​

- type_or_false
  String or boolean. Returns `"file"` or `"directory"` when present, otherwise `false`.

## Notes​

> Checks whether a path exists and returns its type.
> Only presence and type are returned; network failures also yield `false`.

## Example​

    local typ = LCC.web_file.exists("/scripts/main.lua")
    if typ == "file" then
        print("Script found")
    end