Method: Filepath::SearchMethods#entries
- Defined in:
- lib/filepath/filepath.rb
#entries(pattern = '*', recursive = false) ⇒ Object Also known as: glob
921 922 923 924 925 926 927 928 929 930 931 932 933 934 |
# File 'lib/filepath/filepath.rb', line 921 def entries(pattern = '*', recursive = false) if !self.directory? raise Errno::ENOTDIR.new(self) end glob = self glob /= '**' if recursive glob /= pattern raw_entries = Dir.glob(glob) entries = FilepathList.new(raw_entries) return entries end |