- [Instructor] In this movie we're going to learn…about another way that we can access the contents…of directories using something called Glob.…It's a very strange name.…What Glob does is returns an array of file names…which match a pattern.…So unlike entries, that just return everything…that's in the directory, this allows us to use a pattern…to match certain entries.…The patterns are similar to globs in the Unix shell.…That's where the name actually comes from for this method…is from Unix shell where they have globs.…
Basically a Glob is like a very primitive version…of regular expressions.…It doesn't have all the power and all the tools…that are built into regular expressions,…but we do have some basic pattern matching that we can do.…Let's look at the simplest version first.…Here I'm using the dir class, and I'm calling…the Glob class method on that.…And I'm passing in the pattern that I want to match for.…The asterisk is the most simple one there is,…because it's just a wild card.…Basically it says match everything.…
- File system basics
- Writing to and reading from files
- Renaming, deleting, and copying files
- Creating and editing directories
- Working with common data formats
- ERB templating
Skill Level Beginner
Ruby on Rails 5 Essential Trainingwith Kevin Skoglund10h 21m Beginner
1. The File System
2. Work with Files
3. Work with Directories
4. Common Data Formats
5. ERB Templating
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.