# _CP_filelock

_CP_filelock is equivalent to the `filelock *expression*` BASIC statement.

## Syntax

```
int _CP_filelock(int expression)
```

## Description

This function returns -1 if
an error occurs or if the file is already locked. The error code is
contained in _CP_errno.

## See also

- [C functions overview](https://d3codex.com/cfunctions/c-functions-overview/)

---
Source: https://d3codex.com/cfunctions/cp-filelock/ - part of the D3Codex reference.
