Background
This issue is motivated by filecoin-project/lotus#5291. Users have requested that the temporary files created by the FileStore have a more informative name when they are staged before being passed off to the Storage Miner Module.
Where to Begin
|
tempfi, err := p.fs.CreateTemp() |
|
if err != nil { |
|
return xerrors.Errorf("failed to create temp file for data import: %w", err) |
|
} |
|
cleanup := func() { |
|
_ = tempfi.Close() |
|
_ = p.fs.Delete(tempfi.Path()) |
|
} |