Join Kevin Skoglund for an in-depth discussion in this video Working with directories, part of Ruby Essential Training.
Now that we understand how to work with files in Ruby, it's important that we…also understand how to work with directories.…Because we're going to want to navigate around directories to find our files,…and we'll want to create and delete directories in order to organize our files.…Fortunately for us, working with directories is very similar to working with files.…Before we go into IRB, I want to take a look at my ruby_sandbox.…That's the directory I'll be using.…You could use any directory you want, doesn't matter, but take note of…the contents of it.…I've got accessing_files, all the way down to, to_do_list.…Those are the files that are in that directory that I can see.…
Now, let's switch over to the command line.…Notice that I am already inside my ruby_sandbox. If you are on a Windows…machine, once you are in the directory you want, you'll type dir to get a list…of the contents of the directory.…If you are on a Linux, Unix or Mac machine, you'll type ls dash la.…Now, we can view the full listing of these files.…
- 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
Q: You mention e-texteditor.com as a place to get a Windows "sister" version of TextMate. However, e-texteditor.com looks like a Chinese auto website. Are there any other alternatives?
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.