class CGI::Session
def new_store_file(option={}) # :nodoc:
Defaults to the empty string.
the filename for this session's FileStore file.
suffix:: the prefix to add to the session id when generating
Defaults to "cgi_sid_".
the filename for this session's FileStore file.
prefix:: the prefix to add to the session id when generating
on Unix systems).
file. Defaults to Dir::tmpdir (generally "/tmp"
tmpdir:: the directory to use for storing the FileStore
following options are recognised:
+option+ is a hash of options for the initializer. The
digested session id, and _suffix_.
This path is generated under _tmpdir_ from _prefix_, the
does.
This file will be created if it does not exist, or opened if it
Create a new file to store the session data.
def new_store_file(option={}) # :nodoc: dir = option['tmpdir'] || Dir::tmpdir prefix = option['prefix'] suffix = option['suffix'] require 'digest/md5' md5 = Digest::MD5.hexdigest(session_id)[0,16] path = dir+"/" path << prefix if prefix path << md5 path << suffix if suffix if File::exist? path hash = nil elsif new_session hash = {} else raise NoSession, "uninitialized session" end return path, hash end