TMP
Ruby DSL for temporally files read/write in the object oriented way (system tmp).
Manage tmp files in the super easy way!
This dsl let you have simply way to commands and create variables on file system,
by default in the actual systems (cross platform) tmp folder.
Sometimes it can be useful for multi processing (forked processes),
but the main goal is not made for shared memory management!
The goal is to provide dsl for easy tmp files making on the filesystem in the object oriented way
(real objects and not simply strings)
By default i's always IO work and not memory,
everything you save with this will be IO command and not memory management
Every IO command handled by the systems File lock "mutex",
so there will be no different data in different proc threads.
Example
tmp = TMP.new
tmp.tmpdir
tmp['cat']
tmp['cat'] = {a:1}
tmp['cat'] == {a:1}
tmp.open('something','w+') do |f|
p f.read
end
Config
you can config the folder path for custom tmp folder use case if you dont want to use the systems default tmp folder/
require 'tmp'
tmp = TMP.new "/super/awesome/path/to/my/wished/folder"
File mod cheat sheet
TODO
- make ssl encryption or chmod persm change for the tmp files protection as options
- create destructor upon tmp object destruction