Class: TextFile
Constant Summary
Constants inherited
from DSKFile
DSKFile::APPLESOFT_TOKENS
Instance Attribute Summary
Attributes inherited from DOSFile
#contents, #filename, #locked
Attributes inherited from DSKFile
#contents, #filename
Instance Method Summary
collapse
Methods inherited from DOSFile
#catalog_filename, catalog_filename, #initialize
Methods inherited from DSKFile
#==, #buffer_as_applesoft_file, #can_be_picture?, #hex_dump, #initialize, #length_in_sectors, #to_ascii
Constructor Details
This class inherits a constructor from DOSFile
Instance Method Details
#file_extension ⇒ Object
59
60
61
|
# File 'lib/DOSFile.rb', line 59
def file_extension
".txt"
end
|
#file_type ⇒ Object
51
52
53
|
# File 'lib/DOSFile.rb', line 51
def file_type
"T"
end
|
#file_type_byte ⇒ Object
55
56
57
|
# File 'lib/DOSFile.rb', line 55
def file_type_byte
0x00
end
|
#to_s ⇒ Object
63
64
65
66
67
|
# File 'lib/DOSFile.rb', line 63
def to_s
s=""
@contents.each_byte{|b| s+=(b%0x80).chr.tr(0x0D.chr,"\n")}
return s.sub(/\0*$/,"")
end
|