aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/utils
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/utils')
-rw-r--r--Library/Homebrew/cask/lib/hbc/utils/file.rb14
1 files changed, 0 insertions, 14 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/utils/file.rb b/Library/Homebrew/cask/lib/hbc/utils/file.rb
deleted file mode 100644
index 6b80f33ce..000000000
--- a/Library/Homebrew/cask/lib/hbc/utils/file.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-module Hbc
- module Utils
- module_function
-
- def file_locked?(file)
- unlocked = File.open(file).flock(File::LOCK_EX | File::LOCK_NB)
- # revert lock if file was unlocked before check
- File.open(file).flock(File::LOCK_UN) if unlocked
- !unlocked
- rescue
- true
- end
- end
-end