Lines Matching defs:File

1 package File::Temp;
5 File::Temp - return name and handle of a temporary file safely
44 use File::Temp qw/ tempfile tempdir /;
56 require File::Temp;
57 use File::Temp ();
59 $fh = new File::Temp($template);
62 $tmp = new File::Temp( UNLINK => 0, SUFFIX => '.dat' );
69 use File::Temp qw/ :mktemp /;
80 use File::Temp qw/ :POSIX /;
91 $unopened_file = File::Temp::tempnam( $dir, $pfx );
95 C<File::Temp> can be used to create and open temporary files in a safe
97 interface. The File::Temp constructor or the tempfile() function can
129 use File::Spec 0.8;
130 use File::Path qw/ rmtree /;
314 carp "File::Temp::_gettemp: template must not be a reference";
321 carp "File::Temp::_gettemp: Must have even number of options";
371 ($volume, $directories, $file) = File::Spec->splitpath( $path, 1);
375 my @dirs = File::Spec->splitdir($directories);
380 $parent = File::Spec->curdir;
384 $parent = File::Spec->catdir($volume, @dirs[0..$#dirs-1]);
389 $parent = File::Spec->catdir(@dirs[0..$#dirs-1]);
392 $parent = File::Spec->catpath($volume, $parent, '');
399 # Get rid of the last filename (use File::Basename for this?)
400 ($volume, $directories, $file) = File::Spec->splitpath( $path );
403 $parent = File::Spec->catpath($volume,$directories,'');
406 $parent = File::Spec->curdir
430 if (File::Temp->safe_level == MEDIUM) {
436 } elsif (File::Temp->safe_level == HIGH) {
665 if ($info[4] > File::Temp->top_system_uid() && $info[4] != $<) {
668 File::Temp->top_system_uid());
740 unless (File::Spec->file_name_is_absolute($path)) {
741 $path = File::Spec->rel2abs($path);
745 my ($volume, $directories, undef) = File::Spec->splitpath( $path, 1);
747 # Slightly less efficient than having a function in File::Spec
752 my @dirs = File::Spec->splitdir($directories);
757 my $dir = File::Spec->catpath($volume,
758 File::Spec->catdir(@dirs[0.. $#dirs - $pos]),
914 C<File::Temp>. Using the OO interface a temporary file can be created
919 C<File::Temp> object. The object itself acts as a filehandle. Also,
929 my $tmp = new File::Temp();
941 $tmp = new File::Temp( TEMPLATE => 'tempXXXXX',
1051 files, as specified by the tmpdir() function in L<File::Spec>.
1082 (L<File::Spec>) unless a directory is specified explicitly with the
1156 $template = File::Spec->catfile($options{"DIR"}, $template);
1164 $template = File::Spec->catfile($options{"DIR"}, TEMPXXX);
1168 $template = File::Spec->catfile(File::Spec->tmpdir, TEMPXXX);
1236 Create a directory in tmpdir() (see L<File::Spec|File::Spec>).
1262 $tempdir = tempdir ( $template, DIR => File::Spec->tmpdir);
1276 the rmtree() function from the L<File::Path|File::Path> module.
1314 my ($volume, $directories, undef) = File::Spec->splitpath( $template, 1);
1317 $template = (File::Spec->splitdir($directories))[-1];
1322 $template = File::Spec->catdir($options{"DIR"}, $template);
1327 $template = File::Spec->catdir(File::Spec->tmpdir, $template);
1337 $template = File::Spec->catdir($options{"DIR"}, TEMPXXX);
1341 $template = File::Spec->catdir(File::Spec->tmpdir, TEMPXXX);
1556 returned by L<File::Spec|File::Spec>. On some implementations this
1581 See L<File::Spec/tmpdir> for information on the choice of temporary
1589 my $tmpdir = File::Spec->tmpdir;
1595 my $template = File::Spec->catfile($tmpdir, TEMPXXX);
1654 $filename = File::Temp::tempnam( $dir, $prefix );
1673 my $template = File::Spec->catfile($dir, $prefix);
1939 File::Temp->safe_level( File::Temp::HIGH );
1960 $newlevel = File::Temp->safe_level( File::Temp::HIGH );
1962 if $newlevel != File::Temp::HIGH;
2003 File::Temp->top_system_uid(10);
2004 my $topid = File::Temp->top_system_uid;
2065 L<POSIX/tmpnam>, L<POSIX/tmpfile>, L<File::Spec>, L<File::Path>
2067 See L<IO::File> and L<File::MkTemp> for different implementations of