Lines Matching refs:fh

47   ($fh, $filename) = tempfile( DIR => $dir );
49 ($fh, $filename) = tempfile( $template, DIR => $dir);
50 ($fh, $filename) = tempfile( $template, SUFFIX => '.dat');
52 $fh = tempfile();
59 $fh = new File::Temp($template);
60 $fname = $fh->filename;
71 ($fh, $file) = mkstemp( "tmpfileXXXXX" );
72 ($fh, $file) = mkstemps( "tmpfileXXXXXX", $suffix);
83 $fh = tmpfile();
85 ($fh, $file) = tmpnam();
86 $fh = tmpfile();
286 # ($fh, $name) = _gettemp($template, "open" => 1);
293 croak 'Usage: ($fh, $name) = _gettemp($template, OPTIONS);'
450 my $fh;
454 $fh = &Symbol::gensym;
472 $fh = VMS::Stdio::vmssysopen($path, $OPENFLAGS, 0600, 'fop=dlt');
473 $open_success = $fh;
478 $open_success = sysopen($fh, $path, $flags, 0600);
486 return ($fh, $path);
824 # _deferred_unlink( $fh, $fname, $isdir );
871 croak 'Usage: _deferred_unlink($fh, $fname, $isdir)'
874 my ($fh, $fname, $isdir) = @_;
898 push(@files_to_unlink, [$fh, $fname]);
970 my ($fh, $path) = tempfile( @template, %args );
972 print "Tmp: $fh - $path\n" if $DEBUG;
975 ${*$fh} = $path;
978 %{*$fh} = %args;
979 ${*$fh}{UNLINK} = $unlink;
981 bless $fh, $class;
983 return $fh;
1048 ($fh, $filename) = tempfile();
1053 ($fh, $filename) = tempfile($template);
1060 ($fh, $filename) = tempfile($template, SUFFIX => $suffix)
1067 ($fh, $filename) = tempfile($template, DIR => $dir);
1072 ($fh, $filename) = tempfile($template, UNLINK => 1);
1085 $fh = tempfile( $template, DIR => $dir );
1189 my ($fh, $path, $errstr);
1191 unless (($fh, $path) = _gettemp($template,
1205 _deferred_unlink($fh, $path, 0) if $options{"UNLINK"};
1211 return ($fh, $path);
1220 unlink0($fh, $path) or croak "Error unlinking file $path using unlink0";
1223 return $fh;
1392 ($fh, $name) = mkstemp( $template );
1411 my ($fh, $path, $errstr);
1413 unless (($fh, $path) = _gettemp($template,
1421 return ($fh, $path);
1423 return $fh;
1434 ($fh, $name) = mkstemps( $template, $suffix );
1454 my ($fh, $path, $errstr);
1456 unless (($fh, $path) = _gettemp($template,
1464 return ($fh, $path);
1466 return $fh;
1576 ($fh, $file) = tmpnam();
1609 $fh = tmpfile();
1623 my ($fh, $file) = tmpnam();
1627 unlink0($fh, $file)
1630 return $fh;
1698 unlink0($fh, $path) or die "Error unlinking file $path safely";
1731 my ($fh, $path) = @_;
1733 cmpstat($fh, $path) or return 0;
1743 my @fh = stat $fh;
1745 print "Link count = $fh[3] \n" if $DEBUG;
1752 return ( $fh[3] == 0 or $^O eq 'cygwin' ? 1 : 0);
1755 _deferred_unlink($fh, $path, 0);
1768 cmpstat($fh, $path) or die "Error comparing handle with file";
1791 my ($fh, $path) = @_;
1799 my @fh;
1802 @fh = stat $fh;
1804 return unless @fh;
1806 if ($fh[3] > 1 && $^W) {
1807 carp "unlink0: fstat found too many links; SB=@fh" if $^W;
1820 confess "panic: $path is no longer a file: SB=@fh";
1828 my @okstat = (0..$#fh); # Use all by default
1832 @okstat = (0, 2..$#fh);
1836 @okstat = (0,2..7,11..$#fh);
1843 print "Comparing: $_ : $fh[$_] and $path[$_]\n" if $DEBUG;
1847 unless ($fh[$_] eq $path[$_]) {
1864 unlink1($fh, $path) or die "Error closing and unlinking file";
1877 my ($fh, $path) = @_;
1879 cmpstat($fh, $path) or return 0;
1882 close( $fh ) or return 0;
2037 then, on a unix system, use C<"/dev/fd/" . fileno($fh)> for arbitrary
2038 programs, or more generally C<< "+<=&" . fileno($fh) >> for Perl
2044 or die "Can't clear close-on-exec flag on temp fh: $!\n";