On Fri, Oct 12, 2012 at 11:13 PM, Andrew Romanov wrote:
I used ioutil.Tempfile to create tempfile (os.File). Is there a way to
determine path to this tempfile?
I used ioutil.Tempfile to create tempfile (os.File). Is there a way to
determine path to this tempfile?
TempFile creates a new temporary file in the directory dir with a name
beginning with prefix, opens the file for reading and writing, and
returns the resulting *os.File. If dir is the empty string, TempFile
uses the default directory for temporary files (see os.TempDir).
Multiple programs calling TempFile simultaneously will not choose the
same file. *The caller can use f.Name() to find the name of the file.*It
is the caller's responsibility to remove the file when no longer needed.
--