Join Kevin Skoglund for an in-depth discussion in this video File paths, part of Ruby Essential Training.
Now that we've seen how we can use Ruby to get the correct file path separators,…we need to understand how we can get meaningful Files Paths.…How we can locate the files that we either want to read from or write to.…There are two ways that we can specify the path.…The first is using an Absolute path.…The Absolute path is the path from the root of the hard drive, from the very…beginning, how do we locate that file?…It's a path through the folders that would take, that we would have to open up…till we got to that file.…And we know that it's an Absolute path, because it begins with a forward slash…and that lets us know starting at the beginning.…
The second type of path is a Relative path and that's a path from where we are…right now, how do we get there?…We don't care about going back to the beginning.…We say from the current position what folders do we need to either open up or…what parent directories do we need to jump backwards into?…So you will see there in the Relative path example I have got, I have got ..…
- Using Ruby in the Interactive Ruby Shell and in standalone scripts
- Learning to write custom code blocks to find, merge, and sort
- Using modules for namespacing or as mix-ins
- Reading from and writing to files
- Creating a full Ruby project from start to finish
Skill Level Beginner
1. Getting Started with Ruby
2. Ruby Object Types
3. Control Structures
4. Code Blocks
8. Working with Files
9. Ruby Project: Creating the Food Finder
- 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.