fsl.scripts.tmpnam

The tmpnam script has the following usage scenarios

  1. $FSLDIR/bin/tmpnam

    Create a file in $TMPDIR, called $TMPDIR/fsl_XXXXXX

  2. $FSLDIR/bin/tmpnam prefix

    Create a file in the current directory called prefix_XXXXXX

  3. $FSLDIR/bin/tmpnam /some/dir/

    Create a file in the /some/dir/ called fsl_XXXXXX

  4. $FSLDIR/bin/tmpnam /some/dir/prefix

    Create a file in the /some/dir/ called prefix_XXXXXX

  5. $FSLDIR/bin/tmpnam /tmp/prefix

    A special case of #4. Create a file in $TMPDIR called $TMPDIR/prefix_XXXXXX (i.e. /tmp/ is replaced with $TMPDIR)

In all cases, the name of the file that was created is printed to standard output.

fsl.scripts.tmpnam.tmpnam(path=None)[source]

tmpnam function - create a named temporary file, returning its path.

fsl.scripts.tmpnam.main(argv=None)[source]

tmpnam entry point.