Ruby/File Directory/sysread
Материал из Wiki.crossplatform.ru
Версия от 17:57, 13 сентября 2010; ViGOur (Обсуждение | вклад)
use the method sysread to read the contents of a file.
file3 = File.new("C:\\Ruby\\Sample"," r") file3.sysread(20) # This statement will output the first 20 characters of the file. # The file pointer will now be placed at the 21st character in the file.