require "chise/config"
require "chise/rbchise"
require "chise/management"
+require "chise/util"
module CHISE
class DB # abstract class for DataBase
# translate file name for deal with Windows file system.
- def self.unix_to_win(unix_path)
- win = unix_path.gsub(/</, "(")
- win = win.gsub(/>/, ")")
- win = win.gsub(/\*/, "+")
- win = win.gsub(/\?/, "!")
- win
- end
-
- def self.win_to_unix(win_path)
- unix = win_path.gsub(/\)/, ">")
- unix = unix.gsub(/\(/, "<")
- unix = unix.gsub(/\!/, "?")
- unix = unix.gsub(/\+/, "*")
- unix
- end
def get_filename(t)
return @pre + DB.unix_to_win(t) + @post if CHISE.windows?