I want to create a hidden folder for logging information in Ruby, is there a way I can create a hidden folder, and keep it locked with a password, while at the same time logging information to a file inside of it?
Example:
module LogEmail
def log(email)
username = Etc.getlogin
Dir.mkdir <hidden-dir> unless File.Exists?(<hidden-dir>)
separator = "[#{Date.today} #{Time.now.strftime('%T')}] ----------"
File.open("c:/users/#{username}/<hidden-folder>/<log>", 'a+') { |s| s.puts(separator, email) }
end
end
Is this possible?