1
0
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:
pancake
2021-08-17 07:21:33 +02:00
committed by GitHub
parent 8521e227b4
commit 90b25e7a4b
5 changed files with 200 additions and 2 deletions

14
vlib/os/filelock/lib.v Normal file
View 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
}
}