Class: Dir
- Inherits:
-
Object
- Object
- Dir
- Defined in:
- lib/common/ext/dir.rb
Constant Summary collapse
- @@mutex =
Mutex.new
Class Method Summary collapse
Class Method Details
.glob_dir(pattern, dir) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/common/ext/dir.rb', line 5 def self.glob_dir(pattern, dir) result = nil @@mutex.synchronize do Dir.chdir(dir) do result = Dir.glob(pattern) end end return result end |
.mutex ⇒ Object
15 16 17 |
# File 'lib/common/ext/dir.rb', line 15 def self.mutex @@mutex end |