Locking content file

Is there any way to lock a content file while reading/writing to it within a kirby controller function? I’m working with a yaml field to store different user’s inputs so there might be a chance of inconsistency when they save at the same time.

No, there is no way of locking content. But check out this issue for some additional information: https://github.com/getkirby/panel/issues/688

The page lock plugin only works when using the Panel, not with stuff that is added from the frontend.