mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: filesystem level locking api (#11191)
This commit is contained in:
14
vlib/os/filelock/lib.v
Normal file
14
vlib/os/filelock/lib.v
Normal file
@@ -0,0 +1,14 @@
|
||||
module filelock
|
||||
|
||||
pub struct FileLock {
|
||||
name string
|
||||
mut:
|
||||
fd int
|
||||
}
|
||||
|
||||
pub fn new(fileName string) FileLock {
|
||||
return FileLock{
|
||||
name: fileName
|
||||
fd: -1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user