mkdtemp#
Create a directory from a template and return its path.
Σύνοψη#
my $dir = mkdtemp('/tmp/buildXXXXXX');
Τι επιστρέφεται#
The pathname of the directory created with mode 0700. The directory is not registered for cleanup - it remains until the caller removes it or arranges for cleanup themselves.
Παραδείγματα#
use File::Temp qw/ mkdtemp /;
my $dir = mkdtemp('/var/tmp/stageXXXXXX');
## caller owns $dir; remove with rmtree / File::Path
Οριακές περιπτώσεις#
Template with fewer than four trailing
Xs: croaks.Wrong arg count: croaks with a usage message.
Διαφορές από το upstream#
Fully compatible with upstream File::Temp 0.2312.
Δείτε επίσης#
tempdir- higher-level variant acceptingCLEANUP => 1.File::Temp->newdir- OO form that removes the tree automatically.mkstemp- file counterpart.