def self.rootdir
env = ENV['INLINEDIR'] || ENV['HOME']
if env.nil? and WINDOZE then
if ENV['HOMEDRIVE'] && ENV['HOMEPATH'] then
env = ENV['HOMEDRIVE'] + ENV['HOMEPATH']
end
env = ENV['APPDATA'] if env.nil? and ENV['APPDATA']
env = ENV['USERPROFILE'] if env.nil? and ENV['USERPROFILE']
end
if env.nil? then
abort "Define INLINEDIR or HOME in your environment and try again"
end
unless defined? @@rootdir and env == @@rootdir and test ?d, @@rootdir then
rootdir = env
Dir.mkdir rootdir, 0700 unless test ?d, rootdir
Dir.assert_secure rootdir
@@rootdir = rootdir
end
@@rootdir
end