HomePhabricator

Allow callers to choose which directory a "TempFile" is created in

Authored by epriestley on Jul 20 2018, 5:27 PM.

Description

Allow callers to choose which directory a "TempFile" is created in

Summary:
Ref T13167. I'd like to buffer a specific large file (a large database export) to a large volume, instead of to "/tmp" on the root volume.

To support this, let callers optionally choose which directory to use as "/tmp". If they don't specfify, we continue using sys_get_temp_dir(), often /tmp.

Test Plan: See next change.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13167

Differential Revision: https://secure.phabricator.com/D19521