roo-rb / roo

Roo provides an interface to spreadsheets of several sorts.
MIT License
2.79k stars 501 forks source link

Is it possible to make the temporary directories (/tmp) allow an optional path? #460

Closed info-rchitect closed 6 years ago

info-rchitect commented 6 years ago

Depending on the computer location, /tmp is either very large or very small. Could there be a way to configure the location of the temporary directories roo creates?

thx

chopraanmol1 commented 6 years ago

Yes, you can configure temporary directories using the following approach:

  1. You can set environment variable ROO_TMP (ENV["ROO_TMP"]) to change the default temp directory of roo.
  2. You can use tmpdir_root option while intializing some spreadsheet instance. e.g. Roo::Excelx.new("your_file_name.xlsx", tmpdir_root: "location_to_new_temp_dir")
info-rchitect commented 6 years ago

@chopraanmol1 thanks very much for the quick response!