view release on metacpan or search on metacpan
src/win32/include/sys/stat.h view on Meta::CPAN
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
int __cdecl stat(const char *_Filename,struct stat *_Stat);
int __cdecl fstat(int _Desc,struct stat *_Stat);
int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
return _fstat32(_Desc,(struct _stat32 *)_Stat);
}
__CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
return _stat32(_Filename,(struct _stat32 *)_Stat);
}
#else
__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
return _fstat64i32(_Desc,(struct _stat64i32 *)_Stat);
}
__CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
return _stat64i32(_Filename,(struct _stat64i32 *)_Stat);
}
#endif
#endif
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
xgboost/dmlc-core/src/io/local_filesys.cc view on Meta::CPAN
bool use_stdio_;
};
FileInfo LocalFileSystem::GetPathInfo(const URI &path) {
struct stat sb;
if (stat(path.name.c_str(), &sb) == -1) {
int errsv = errno;
LOG(FATAL) << "LocalFileSystem.GetPathInfo " << path.name
<< " Error:" << strerror(errsv);
}
FileInfo ret;
view all matches for this distribution
view release on metacpan or search on metacpan
include/boost/config/platform/vxworks.hpp view on Meta::CPAN
// Include signal.h which might contain a typo to be corrected here
#include <signal.h>
#if (_WRS_VXWORKS_MAJOR < 7)
#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway!
inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
#endif
#ifndef S_ISSOCK
# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket?
#endif
#ifndef FPE_FLTINV
view all matches for this distribution
view release on metacpan or search on metacpan
libcares/test/gmock-1.8.0/gtest/gtest.h view on Meta::CPAN
inline int FileNo(FILE* file) { return reinterpret_cast<int>(_fileno(file)); }
// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this
// time and thus not defined there.
# else
inline int FileNo(FILE* file) { return _fileno(file); }
inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); }
inline int RmDir(const char* dir) { return _rmdir(dir); }
inline bool IsDir(const StatStruct& st) {
return (_S_IFDIR & st.st_mode) != 0;
}
# endif // GTEST_OS_WINDOWS_MOBILE
libcares/test/gmock-1.8.0/gtest/gtest.h view on Meta::CPAN
typedef struct stat StatStruct;
inline int FileNo(FILE* file) { return fileno(file); }
inline int IsATTY(int fd) { return isatty(fd); }
inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); }
inline int StrCaseCmp(const char* s1, const char* s2) {
return strcasecmp(s1, s2);
}
inline char* StrDup(const char* src) { return strdup(src); }
inline int RmDir(const char* dir) { return rmdir(dir); }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Devel/CheckOS.pm view on Meta::CPAN
$re_AssertOS = qr/$case_flag ^AssertOS$/x;
}
# sort by mtime, so oldest last
my @modules = sort {
(stat($a->{file}))[9] <=> (stat($b->{file}))[9]
} map {
my (undef, $dir_part, $file_part) = File::Spec->splitpath($_);
$file_part =~ s/\.pm$//;
my (@dirs) = grep {+length} File::Spec->splitdir($dir_part);
foreach my $i (reverse 1..$#dirs) {
view all matches for this distribution
view release on metacpan or search on metacpan
maxminddb/src/maxminddb.c view on Meta::CPAN
fcntl(fd, F_SETFD, fd_flags | FD_CLOEXEC);
}
#endif
struct stat s;
if (fstat(fd, &s)) {
status = MMDB_FILE_OPEN_ERROR;
goto cleanup;
}
off_t size = s.st_size;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Devel/CheckOS.pm view on Meta::CPAN
$re_AssertOS = qr/$case_flag ^AssertOS$/x;
}
# sort by mtime, so oldest last
my @modules = sort {
(stat($a->{file}))[9] <=> (stat($b->{file}))[9]
} map {
my (undef, $dir_part, $file_part) = File::Spec->splitpath($_);
$file_part =~ s/\.pm$//;
my (@dirs) = grep {+length} File::Spec->splitdir($dir_part);
foreach my $i (reverse 1..$#dirs) {
view all matches for this distribution
view release on metacpan or search on metacpan
libuv/ChangeLog view on Meta::CPAN
* unix: use uv__is_closing everywhere (Santiago Gimeno)
* win: add missing break statement (cjihrig)
* doc: fix wrong man page link for uv_fs_lstat() (Michele Caini)
* win, tty: handle empty buffer in uv_tty_write_bufs (Hitesh Kanwathirtha)
* doc: add cjihrig alternative GPG ID (cjihrig)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AlignDB/GC.pm view on Meta::CPAN
my @segment_seqs = map { $segment_set->substr_span($_) } @{$seqs_ref};
my $gc_mean = _calc_gc_ratio(@segment_seqs);
my ( $gc_std, $gc_mdcw ) = ( undef, undef );
my ( undef, undef, $gc_cv, undef ) = $self->segment_gc_stat( $seqs_ref, $resize_set, 100, 100 );
return ( $gc_mean, $gc_std, $gc_cv, $gc_mdcw );
}
sub _mean {
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
script/applypatch view on Meta::CPAN
|| warn sprintf ("WARNING: Cannot utime/chmod 0%o $fn: $!\n", $mode);
}
sub do_unlink ($) {
my ($fn) = @_;
my $mode = (stat($fn))[2];
chmod (0777, $fn)
|| warn ("WARNING: Cannot unlink/chmod a+rwx $fn: $!\n");
print STDERR ("+ unlink $fn\n") if $verbose;
return if unlink ($fn);
warn ("WARNING: Cannot remove $fn: $!\n");
script/applypatch view on Meta::CPAN
|| warn sprintf ("WARNING: Cannot unlink/chmod 0%o $fn: $!\n", $mode);
}
sub do_rmdir ($) {
my ($fn) = @_;
my $mode = (stat($fn))[2];
chmod (0777, $fn)
|| warn ("WARNING: Cannot rmdir/chmod a+rwx $fn: $!\n");
print STDERR ("+ rmdir $fn\n") if $verbose;
return if rmdir ($fn);
warn ("WARNING: Cannot rmdir $fn: $!\n");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alzabo/Schema.pm view on Meta::CPAN
my $schema_dir = Alzabo::Config::schema_dir();
my $file = $class->_schema_filename($name);
if (exists $CACHE{$name}{$class}{object})
{
my $mtime = (stat($file))[9]
or Alzabo::Exception::System->throw( error => "can't stat $file: $!" );
return $CACHE{$name}{$class}{object}
if $mtime <= $CACHE{$name}{$class}{mtime};
}
view all matches for this distribution
view release on metacpan or search on metacpan
factpacks/Linux.fact view on Meta::CPAN
ShoutPlug => <reply> $who, SMiaB plug-in for ShoutCast MP3 audio servers. URL: http://www.vaxxine.com/pegasoft/
shout_tools => <reply> $who, CGI suite for icecast/shout song status/requesting. URL: http://www.andrew.cmu.edu/~nstrom/shout_tools/index.html
show-host => <reply> $who, Lets a website always point to a DHCP'd or dialup computer.. URL: http://www.core.binghamton.edu/~burner/show-host/
shredder => <reply> $who, Punishes users who have too many processes running. URL: http://www3.cybercities.com/s/sylex/index.html
shsmod => <reply> $who, enable High Speed mode on some SMC/NS/Winbond Multi-I/O chips Serial. URL: http://www.os.rim.or.jp/~gigo/over115K/index_e.html
shstat => <reply> $who, Designed to give stat() info to shell scripts. URL: http://www.gormand.com.au/tools/shstat/
shThemes => <reply> $who, GTK theme selector. URL: http://home.earthlink.net/~ntnunk/shthemes/
shuffle => <reply> $who, Write lines of concatenated file(s) in random order. URL: http://cscw1.ifs.uni-linz.ac.at/alba/shuffle/
Shutdown Commander => <reply> $who, Curses-based console shutdown utility. URL: http://www.duskglow.com/software.shtml
shViewer => <reply> $who, GTK+/Imlib image viewer. URL: http://home.earthlink.net/~ntnunk/shviewer/
si => <reply> $who, /proc system information viewer. URL: http://si.netpedia.net/
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
Efun/Core/Core.pm view on Meta::CPAN
{
package Anarres::Mud::Driver::Efun::Core::file_size;
use Fcntl qw(:mode);
sub invoke {
my @stat = stat($_[1]);
return -1 unless @stat;
return -2 if ($stat[2] & S_IFDIR);
return $stat[2];
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnnoCPAN/Dist.pm view on Meta::CPAN
=cut
sub stat {
my ($self) = @_;
$self->{stat} ||= File::stat::stat($self->pathname);
}
sub dbi_dist { shift->{dbi_dist} }
sub dbi_distver { shift->{dbi_distver} }
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/Ante/Deluvian/Dialog.pm view on Meta::CPAN
# while (/([\040-\176\s]{4,})/g) {
# push @txtlns, $1;
# }
#}
$doFmt = FALSE;
@filstat = stat($itxt);
@txtlns = ( "$itxt", "appears to be a binary file ...", "");
foreach my $i (0 .. $#filstat) {
push @txtlns, sprintf("%-10s -> %s", $stNames[$i], $stNames[$i] =~ /time/ ? scalar localtime($filstat[$i]) : $filstat[$i]);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Antispam/Toolkit/Role/BerkeleyDB.pm view on Meta::CPAN
my $db_file = $self->database();
return
$db_file->basename() . ' - '
. DateTime->from_epoch( epoch => $db_file->stat()->mtime() )
->iso8601();
}
sub build {
my $class = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Any/Daemon/HTTP/Directory.pm view on Meta::CPAN
my (%dirlist, %users, %groups);
foreach my $name (grep $prefilter->($_), readdir $from_dir)
{ my $path = $dirname.$name;
my %d = (name => $name, path => $path);
@d{@stat_fields}
= $hide_symlinks ? stat($path) : lstat($path);
if(!$hide_symlinks && -l _)
{ @d{qw/kind is_symlink /} = ('SYMLINK', 1)}
elsif(-d _) { @d{qw/kind is_directory/} = ('DIRECTORY',1)}
elsif(-f _) { @d{qw/kind is_file /} = ('FILE', 1)}
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
lib/AnyEvent/IO/IOAIO.pm view on Meta::CPAN
sub aio_chmod($$$) {
my $cb = $_[2];
IO::AIO::aio_chmod $_[0], $_[1], sub { $cb->($_[0] ? () : 1) };
}
sub aio_stat($$) {
my $cb = $_[1];
IO::AIO::aio_stat $_[0], sub { $cb->($_[0] ? () : 1) };
}
sub aio_lstat($$) {
my $cb = $_[1];
IO::AIO::aio_lstat $_[0], sub { $cb->($_[0] ? () : 1) }
}
sub aio_link($$$) {
view all matches for this distribution