Method: Webgen::Website#tmpdir
- Defined in:
- lib/webgen/website.rb
#tmpdir(path = '', create = false) ⇒ Object
Append the path to the website’s temporary directory and return the full path to it.
Note that the temporary directory is only created if the create
parameter is set to true.
200 201 202 203 204 |
# File 'lib/webgen/website.rb', line 200 def tmpdir(path = '', create = false) @_tmpdir = File.absolute_path(config['website.tmpdir'], @directory) unless defined?(@_tmpdir) FileUtils.mkdir_p(@_tmpdir) if create File.join(@_tmpdir, path) end |