Class: TextFile

Inherits:
DOSFile show all
Defined in:
lib/DOSFile.rb

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_extensionObject



59
60
61
# File 'lib/DOSFile.rb', line 59

def file_extension
	".txt"
end

#file_typeObject



51
52
53
# File 'lib/DOSFile.rb', line 51

def file_type
	"T"
end

#file_type_byteObject



55
56
57
# File 'lib/DOSFile.rb', line 55

def file_type_byte
	0x00
end

#to_sObject



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