Join Kevin Skoglund for an in-depth discussion in this video File pointer, part of Ruby Essential Training.
In this movie, I want to explain what the file pointer is and show you how…you can manipulate it.…The file pointer works a lot like the cursor does inside your word…processing program.…You can use the arrows to move around the text until you find the position that…you want and then you can start typing and it'll start typing at that spot.…Well the file pointer works the same way with a couple of differences.…First of all, if the file pointer is at a certain spot, it doesn't insert text.…It overwrites text.…So be careful about that.…The second difference is that we use the file pointer not just for writing to…files but also for reading from files.…
And you may have noticed that in the last movie, when we're reading back data…from a file, if we asked it to give us 5 characters, then when we asked it for…another five, it started after those first five. It kept track.…It moved the pointer along to keep track of the fact that it had already given…us 5 characters and it didn't give them to us again.…
- 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?
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.