[#fsbridge-FileLock]
= xref:fsbridge.adoc[fsbridge]::FileLock
:relfileprefix: ../
:mrdocs:

Advisory lock on a file, released when the object is destroyed&period;

== Synopsis

Declared in `&lt;util&sol;fs&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class FileLock;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:fsbridge/FileLock/2constructor-0a.adoc[`FileLock`]         [.small]#[constructor]#
| Constructors
| xref:fsbridge/FileLock/2destructor.adoc[`&#126;FileLock`] [.small]#[destructor]#
| Release the lock, if held, and close the underlying file handle&period;
| xref:fsbridge/FileLock/GetReason.adoc[`GetReason`] 
| Describe why the most recent TryLock() failed&period;
| xref:fsbridge/FileLock/TryLock.adoc[`TryLock`] 
| Attempt to acquire the lock without blocking&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
