Function FileBasedLock.lockTry

Attempts to lock the file and return immediately

bool lockTry();

Returns

Returns true if the lock is acquired, false otherwise