From b17b63aec5e19e39a9a0f75b3b122d96b1beea99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sun, 25 Jul 2021 17:40:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=80=E4=B8=AA=E4=B8=8D?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/apps/file_others.go | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 internal/apps/file_others.go diff --git a/internal/apps/file_others.go b/internal/apps/file_others.go deleted file mode 100644 index 73bf2fe..0000000 --- a/internal/apps/file_others.go +++ /dev/null @@ -1,17 +0,0 @@ -// +build !windows - -package apps - -import ( - "os" - "syscall" -) - -// lock file -func LockFile(fp *os.File) error { - return syscall.Flock(int(fp.Fd()), syscall.LOCK_EX|syscall.LOCK_NB) -} - -func UnlockFile(fp *os.File) error { - return syscall.Flock(int(fp.Fd()), syscall.LOCK_UN) -}