2 # PhysicsFS - ruby interface
4 # Author: Ed Sinjiashvili (slimb@vlinkmail.com)
13 def initialize major, minor, patch
19 attr_reader :major, :minor, :patch
22 "#@major.#@minor.#@patch"
27 def initialize ext, desc, author, url
34 attr_reader :extension, :description
35 attr_reader :author, :url
38 " * #@extension: #@description\n Written by #@author.\n #@url\n"
51 def append_search_path str
52 add_to_search_path str, 1
56 def prepend_search_path str
57 add_to_search_path str, 0
61 alias_method :<<, :append_search_path
62 alias_method :push, :append_search_path
63 alias_method :unshift, :prepend_search_path
71 # File - PhysicsFS abstract file - can be drawn from various sources
75 write str, 1, str.length
86 alias_method :size, :length
90 # RWops - general stdio like operations on file-like creatures
97 # tell current position of RWopted entity
102 # length of RWops abstracted entity
110 alias_method :size, :length
113 # create rwops from PhysicsFS file object
115 def self.from_physfs file
121 # physfs.rb ends here #