view release on metacpan or search on metacpan
unless ( $skip ) {
for (2,4) {
mv catfile(DATA_DIR, "miffy.$_"), catfile(DATA_DIR, "miffy-moved.$_");
}
for (map "miffy.$_", 1,3..5) {
my $stat = (stat($_))[2] & 0777;
my $target = catfile(DATA_DIR, $_);
chmod 0600, $target
if -e $target; # #4 should be gone
cp $_, $target
or die sprintf "Failed to move %s -> %s: $!", $_, $target;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# If the script that is loading Module::Install is from the future,
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 and (stat($0))[9] > time ) {
die << "END_DIE";
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
t/common.pm view on Meta::CPAN
my $testString = pack('C256', 0 .. 255);
my $testCrc = Archive::Zip::computeCRC32($testString);
$fh->write($testString, length($testString)) or return 0;
$fh->close();
(-f OUTPUTZIP) or return 0;
my @stat = stat(OUTPUTZIP);
$stat[7] == length($testString) or return 0;
fileCRC(OUTPUTZIP) == $testCrc or return 0;
unlink(OUTPUTZIP);
return 1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
Version 2.0000
* Change to a versioning scheme more friendly to the mysterious
black box known as PAUSE
* Don't fail on EACCES when stat()ing file
Version 1.9
* Fix a bug in b_find() wherein some error recovery code tried to destroy
the same object twice, potentially
* Retool $builder->archive_as() to display error names for archive members,
rather than their original filenames, in appropriate circumstances
Version 1.6
* Avoid stat() calls on files excluded from archive
Version 1.5
* Correct handling of files between 4 GiB & 8 GiB, inclusive
view all matches for this distribution
view release on metacpan or search on metacpan
t/001Basic.t view on Meta::CPAN
ok(-s $f2 > 0, "Checking tarball files sizes");
is(-s $f1, -s $f2, "Comparing tarball files sizes");
my $f3 = $a2->locate("foo/bar/permtest");
my $perm = ((stat($f3))[2] & 07777);
is($perm, 0770, "permtest");
my $f4 = $a2->locate("foo/bar/string");
open FILE, "<$f4" or die "Cannot open $f4";
my $got_data = join '', <FILE>;
t/001Basic.t view on Meta::CPAN
);
$a5->read("$TARDIR/bar.tar");
$f1 = $a5->locate("bar/bar.dat");
$perm = ((stat($f1))[2] & 07777);
is($perm, 0664, "permtest");
SKIP: {
# gnu options
my $a6 = Archive::Tar::Wrapper::IPC::Cmd->new(
view all matches for this distribution
view release on metacpan or search on metacpan
t/001Basic.t view on Meta::CPAN
ok( -s $f2 > 0, 'Checking tarball files sizes' );
is( -s $f1, -s $f2, 'Comparing tarball files sizes' );
my $f3 = $a2->locate('foo/bar/permtest');
my $expected_permission = sprintf '%3o', ( ( stat($f3) )[2] & 07777 );
SKIP: {
skip 'Permissions are too different on Microsoft Windows', 1
if ( $Config{osname} eq 'MSWin32' || $Config{osname} eq 'msys' );
is( $expected_permission, '770',
t/001Basic.t view on Meta::CPAN
$a5->read( File::Spec->catfile( TARDIR, 'bar.tar' ) );
$f1 = $a5->locate('bar/bar.dat');
# TODO: add conditional note on Alpine to indicate that tar over there is broken regarding -p parameter
if ($f1) {
$expected_permission = sprintf '%3o', ( ( stat($f1) )[2] & 07777 );
}
else {
note( 'Could not locate "bar/bar.dat" inside the tarball '
. File::Spec->catfile( TARDIR, 'bar.tar' ) );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Tar/File.pm view on Meta::CPAN
if ($hash{uid} > 0x10000) {
$hash{uid} = $hash{uid} & 0xFFFF;
}
### The file length from stat() is the physical length of the file
### However the amount of data read in may be more for some file types.
### Fixed length files are read past the logical EOF to end of the block
### containing. Other file types get expanded on read because record
### delimiters are added.
view all matches for this distribution
view release on metacpan or search on metacpan
unzip-6.0/ToDo view on Meta::CPAN
o MSDOS/WIN32/others: detection of "reserved" names (= names of character
devices, or system extensions that look like a characters device driver)
at runtime; with the goal of emitting "meaningful" error messages and/or
rename queries.
(Currently, these reserved names are catched as "non-deletable files".
On MSDOS and WIN32, when the RTL stat() function allows to identify
character devices, the "reserved" names are automatically prefixed with
an underscore.)
o redesign "file exists -- is newer/older -- overwrite/skip/rename"
logic in extract.c and the corresponding system specific mapname()
unzip-6.0/ToDo view on Meta::CPAN
=======================================
o miscellaneous little stuff: whenever
--------------------------
- change DOS -f/-u stuff to use DOS API for getting filetimes, not stat()
- add (-N?) option to lose all user input and/or switch to "(*input)()"
function, replaceable by UzpAltMain() param
- add -@ option to read from stdin (zip) or from file (PKZIP)? (go32 built-in)
- add -oo option to overwrite OS/2 and DOS system and hidden files, too
view all matches for this distribution
view release on metacpan or search on metacpan
ZZip/ZZip.xs view on Meta::CPAN
OUTPUT:
RETVAL
HV *
stat(dir, name, flags)
Archive_ZZip dir
char *name
int flags
INIT:
int err;
ZZIP_DIRENT dirent;
HV *info;
CODE:
err = zzip_dir_stat(dir, name, &dirent, flags);
if (err == 0) {
HV_WITH_DIRENT(info, dirent);
}
else {
XSRETURN_UNDEF;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Zip/SimpleZip.pm view on Meta::CPAN
my ($mode, $uid, $gid, $size, $atime, $mtime, $ctime) ;
if ( $got->parsed('storelinks') )
{
($mode, $uid, $gid, $size, $atime, $mtime, $ctime)
= (lstat($filename))[2, 4, 5, 7, 8, 9, 10] ;
}
else
{
($mode, $uid, $gid, $size, $atime, $mtime, $ctime)
= (stat($filename))[2, 4, 5,7, 8, 9, 10] ;
}
$got->setValue(time => $mtime);
if (! $got->getValue('minimal')) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Zip/Archive.pm view on Meta::CPAN
if (!defined($fileName)) {
_error("updateMember(): missing fileName argument");
return undef;
}
my @newStat = stat($fileName);
if (!@newStat) {
_ioError("Can't stat $fileName");
return undef;
}
lib/Archive/Zip/Archive.pm view on Meta::CPAN
# Now @files has all the files that I could potentially be adding to
# the zip. Only add the ones that are necessary.
# For each file (updated or not), add its member name to @done.
my %done;
foreach my $fileName (@files) {
my @newStat = stat($fileName);
my $isDir = -d _;
# normalize, remove leading ./
my $memberName = _asZipDirName($fileName, $isDir);
if ($memberName eq $rootZipName) { $memberName = $dest }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Arepa/Web/Public.pm view on Meta::CPAN
description => $pkg->name . " " . $pkg->version .
" was uploaded by " .
$self->_retarded_escape($pkg->maintainer) .
".<br/>" . $signature_info,
pubDate => strftime("%a, %d %b %Y %H:%M:%S %z",
localtime(stat($pkg->path)->mtime)),
);
}
$self->render_text($rss->as_string);
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
t/10arrayref.t view on Meta::CPAN
ok(join("",map{$lines[$_]->[1]}@rand),join("",map{$testLines[$_]}@rand)); # equal content
### Test if the offsets confirm the line`s lengths ###
push @testOffsets, $testOffsets[-1]+length($testLines[-1]); # offset of EOF
ok($testOffsets[-1],(stat($TEST_FILE))[7]); # EOF should be the file`s size
my $offs = 0;
ok(join("; ",0,map{ $offs += length($_->[1]) }@lines),join("; ",@testOffsets));
untie @lines;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# If the script that is loading Module::Install is from the future,
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 and (stat($0))[9] > time ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
view all matches for this distribution
view release on metacpan or search on metacpan
ok -e $path, 'temporary file exists';
undef $file;
ok !-e $path, 'temporary file has been cleaned up';
# Open existing and upgrade to rw
Asset::File->new({path => $path, cleanup => 0})->add_chunk('foo');
my $stat = [(stat($path))];
$file = Asset::File->new(path => $path);
is_deeply [(stat($path))], $stat, "opening didn't affect stat";
ok eval { $file->add_chunk('bar') }, "didn't die";
is $file->get_chunk, 'foobar', 'right content';
undef $file;
ok -e $path, 'file exists';
unlink $path;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Module/Test/App.pm view on Meta::CPAN
same_path $got, $want, 'Got the same path';
This subroutine implements a test to see if the first two arguments
represent the same file path. On systems that do not support reliable
inode results from C<stat()> (that is, MSWin32 and friends, riscos, and
VMS) the test is simply a comparison of normalized paths. On systems
that support (or are suspected to support) reliable inodes, if the
normalized paths are different the inode numbers are compared.
=head1 METHODS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/FITS/Header/NDF.pm view on Meta::CPAN
}
if ($status == $good) {
# See if the extension exists
ndf_xstat( $indf, "FITS", my $there, $status);
if ($status == $good && $there) {
# Find the FITS extension
ndf_xloc($indf, 'FITS', 'READ', my $xloc, $status);
lib/Astro/FITS/Header/NDF.pm view on Meta::CPAN
croak "Missing argument to writehdr. Must include either ndfID or File key";
}
# Now need to find out whether we have a FITS header in the
# file already
ndf_xstat( $ndfid, 'FITS', my $there, $status);
# delete it
ndf_xdel($ndfid, 'FITS', $status) if $there;
# Get the fits array
view all matches for this distribution