Class: CPMFile

Inherits:
NativeFileType show all
Defined in:
lib/native_file_types/cpm/CPMFile.rb

Direct Known Subclasses

MBasic

Instance Attribute Summary

Attributes inherited from NativeFileType

#aux_code, #contents, #file_system_image, #file_type, #filename, #meta_data

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from NativeFileType

#<=>, #==, all_native_file_types, best_fit, code_for_tests, compatability_score, #data_without_header, file_type_matches?, #full_filename, #header_length, #initialize, is_valid_file_if, load_address, matching_score, native_file_types_possible_on_file_system, non_matching_score, #to_hex_dump, #to_info_dump, #type_description

Methods included from SubclassTracking

extended

Constructor Details

This class inherits a constructor from NativeFileType

Class Method Details

.file_system_file_typesObject



4
5
6
7
8
# File 'lib/native_file_types/cpm/CPMFile.rb', line 4

def self.file_system_file_types
  {
    AppleCPM=>:any
  }
end

.split_filename(filename) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/native_file_types/cpm/CPMFile.rb', line 15

def self.split_filename(filename)
  filename=~/^([^.]{0,8})(\.([^.]{0,3}))?$/ #filename should have 0-8 chars, then optionally a dot and up to 3 more chars.		
  partial_filename=$1
  ext=$3
  ext="" if ext.nil?
return [partial_filename,ext]
end

Instance Method Details

#load_addressObject



11
12
13
# File 'lib/native_file_types/cpm/CPMFile.rb', line 11

def load_address
  0x100
end