Ruby/File Directory/File position

Материал из Wiki.crossplatform.ru

Версия от 17:57, 13 сентября 2010; ViGOur (Обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Set position of a file

f = File.open("text.txt")
f.pos = 8
puts f.gets
puts f.pos



Your Position Within a File

f = File.open("text.txt")
puts f.pos
puts f.gets
puts f.pos