SafeFilename

lsst.daf.butler.core.safeFileIo.SafeFilename(name)

Context manager for creating a file in a manner avoiding race conditions.

The context manager provides a temporary filename with no open file descriptors (as this can cause trouble on some systems). After the user is done, we move the file into the desired place.