Results
19.07.2019
file_transfer 8.x-2.0-beta2 ::
vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php
function filemtime($path)
{
return $this->_get_stat_cache_prop($path, 'mtime');
}
/**
* Gets file permissions
*
* @param string $path 25.09.2019
foldershare 8.x-1.2 ::
src/Utilities/FileUtilities.php
* - 'size': the size, in bytes. * - 'atime': the last access time stamp. * - 'mtime': the last modified time stamp. * - 'ctime': the created time stamp. * * @param string $path * The URI or local path to a file or directory. * * @return array
* - 'size': the size, in bytes. * - 'atime': the last access time stamp. * - 'mtime': the last modified time stamp. * - 'ctime': the created time stamp. * - 'blksize': the block size on some systems, and -1 on Windows. * - 'blocks': the number of blocks allocated, and -1 on Windows. * * @see ::filesize() * @see https://php.net/manual/en/function.stat.php
25.09.2019
foldershare 8.x-1.2 ::
src/Entity/FolderShareTraits/OperationUnarchiveTrait.php
// - 'crc' = the CRC (cyclic redundancy check) for the file.
// - 'size' = the uncompressed file size.
// - 'mtime' = the modification time stamp.
// - 'comp_size' = the compressed file size.
// - 'comp_method' = the compression method.
// - 'encryption_method' = the encryption method.
//
// We do not support encryption, and we rely upon ZipArchive to handle
// CRC checking and decompression. So the only values we need are:
// CRC checking and decompression. So the only values we need are:
// - 'name'
// - 'mtime'
//
// Note that the name returned is in the original file's character
// encoding, which we don't know and it may not match that of the
// current OS. We therefore need to attempt to detect the encoding of
// each name and convert it to our generic UTF-8.
//
$stat = $archive->statIndex($i, \ZipArchive::FL_UNCHANGED);
$zipPath = $stat['name'];
$zipTime = isset($stat['mtime']) === FALSE ? 0 : $stat['mtime'];
// Insure the ZIP file path is in UTF-8.
$zipPathEncoding = mb_detect_encoding($zipPath, NULL, TRUE);
if ($zipPathEncoding !== 'UTF-8') {
$zipPath = mb_convert_encoding($zipPath, 'UTF-8', $zipPathEncoding);
}
$stat = $archive->statIndex($i, \ZipArchive::FL_UNCHANGED);
$zipPath = $stat['name'];
$zipTime = isset($stat['mtime']) === FALSE ? 0 : $stat['mtime'];
// Insure the ZIP file path is in UTF-8.
$zipPathEncoding = mb_detect_encoding($zipPath, NULL, TRUE);
if ($zipPathEncoding !== 'UTF-8') {
$zipPath = mb_convert_encoding($zipPath, 'UTF-8', $zipPathEncoding);
} 01.10.2018
mmu 8.x-1.0 ::
mmu.module
$details['Version'] = $version;
}
if (!empty($module['#module']->info['mtime'])) {
$details['Date'] = \Drupal::service('date.formatter')->format($module['#module']->info['mtime']);
}
if (!empty($module['#requires'])) {
$details['Requires'] = implode(', ', $module['#requires']);
}
if (!empty($module['#required_by'])) {
$details['Required by'] = implode(', ', $module['#required_by']); 31.01.2019
onepilot 8.x-1.1 ::
src/Controller/OnePilotController.php
'path' => $relativePath,
'size' => $fstat['size'],
'mtime' => $fstat['mtime'],
'checksum' => md5_file($absolutePath),
];
}
return $filesProperties;
} 12.01.2020
yandexdisk 8.x-1.x-dev ::
src/StreamWrapper/YandexDiskStreamWrapper.php
$stat['blksize'] = $stat['blocks'] = -1;
$stat['size'] = (int) @$properties['d:getcontentlength'];
$stat['mtime'] = strtotime($properties['d:getlastmodified']);
// File/dir mode.
$stat['mode'] = isset($properties['d:collection']) ? 16749 : 33206;
return $stat;
}
catch (YandexDiskException $e) { 02.06.2020
yoti 8.x-2.5 ::
sdk/phpseclib/Net/SFTP.php
function filemtime($path)
{
return $this->_get_stat_cache_prop($path, 'mtime');
}
/**
* Gets file permissions
*
* @param string $path 31.12.2024
media_export_files 1.0.0 ::
vendor/pclzip/pclzip.lib.php
$p_filedescr['mtime'] = $v_value;
break;
case PCLZIP_ATT_FILE_CONTENT:
$p_filedescr['content'] = $v_value;
break;
} elseif ($p_filedescr['type'] == 'folder') {
$p_header['external'] = 0x00000010;
$p_header['mtime'] = filemtime($p_filename);
$p_header['size'] = filesize($p_filename);
// ----- Look for virtual file
} elseif ($p_filedescr['type'] == 'virtual_file') {
$p_header['external'] = 0x00000000;
$p_header['size'] = strlen($p_filedescr['content']);
// ----- Look for filetime
if (isset($p_filedescr['mtime'])) {
$p_header['mtime'] = $p_filedescr['mtime'];
} elseif ($p_filedescr['type'] == 'virtual_file') {
$p_header['mtime'] = time();
} else {
$p_header['mtime'] = filemtime($p_filename);
}
// ------ Look for file comment
if (isset($p_filedescr['comment'])) {
$p_header['comment_len'] = strlen($p_filedescr['comment']);
$p_header['comment'] = $p_filedescr['comment'];
// ----- Set the attributes
$p_header['compression'] = ord($v_data_header['cm']);
//$p_header['mtime'] = $v_data_header['mtime'];
$p_header['crc'] = $v_data_footer['crc'];
$p_header['compressed_size'] = filesize($v_gzip_temp_name) - 18;
// ----- Close the file
@fclose($v_file_compressed);
// ----- Transform UNIX mtime to DOS format mdate/mtime
$v_date = getdate($p_header['mtime']);
$v_mtime = ($v_date['hours'] << 11) + ($v_date['minutes'] << 5) + $v_date['seconds'] / 2;
$v_mdate = (($v_date['year'] - 1980) << 9) + ($v_date['mon'] << 5) + $v_date['mday'];
// ----- Packed data
$v_binary_data = pack("VvvvvvVVVvv", 0x04034b50, $p_header['version_extracted'], $p_header['flag'], $p_header['compression'], $v_mtime, $v_mdate, $p_header['crc'], $p_header['compressed_size'], $p_header['size'], strlen($p_header['stored_filename']), $p_header['extra_len']);
// ----- Transform UNIX mtime to DOS format mdate/mtime
$v_date = getdate($p_header['mtime']);
$v_mtime = ($v_date['hours'] << 11) + ($v_date['minutes'] << 5) + $v_date['seconds'] / 2;
$v_mdate = (($v_date['year'] - 1980) << 9) + ($v_date['mon'] << 5) + $v_date['mday'];
// ----- Packed data
$v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50, $p_header['version'], $p_header['version_extracted'], $p_header['flag'], $p_header['compression'], $v_mtime, $v_mdate, $p_header['crc'], $p_header['compressed_size'], $p_header['size'], strlen($p_header['stored_filename']), $p_header['extra_len'], $p_header['comment_len'], $p_header['disk'], $p_header['internal'], $p_header['external'], $p_header['offset']);
// $p_info['size'] = Size of the file.
// $p_info['compressed_size'] = Compressed size of the file.
// $p_info['mtime'] = Last modification date of the file.
// $p_info['comment'] = Comment associated with the file.
// $p_info['folder'] = true/false : indicates if the entry is a folder or not.
// $p_info['status'] = status of the action on the file.
// $p_info['crc'] = CRC of the file content.
// Parameters :
// Return Values :
$p_info['size'] = $p_header['size'];
$p_info['compressed_size'] = $p_header['compressed_size'];
$p_info['mtime'] = $p_header['mtime'];
$p_info['comment'] = $p_header['comment'];
$p_info['folder'] = (($p_header['external'] & 0x00000010) == 0x00000010);
$p_info['index'] = $p_header['index'];
$p_info['status'] = $p_header['status'];
$p_info['crc'] = $p_header['crc'];
// ----- Look if the extracted file is older
} elseif (filemtime($p_entry['filename']) > $p_entry['mtime']) {
// ----- Change the file status
if ((isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) && ($p_options[PCLZIP_OPT_REPLACE_NEWER] === true)) {
} else {
$p_entry['status'] = "newer_exist";
// ----- Look for PCLZIP_OPT_STOP_ON_ERROR
// ----- Change the file mtime
touch($p_entry['filename'], $p_entry['mtime']);
} else {
// ----- TBC
// Need to be finished
if (($p_entry['flag'] & 1) == 1) {
PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \'' . $p_entry['filename'] . '\' is encrypted. Encrypted files are not supported.');
// ----- Change the file mtime
@touch($p_entry['filename'], $p_entry['mtime']);
}
// ----- Look for chmod option
if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) {
// ----- Change the mode of the file
// ----- Recuperate date in UNIX format
$p_header['mdate'] = $v_data['mdate'];
$p_header['mtime'] = $v_data['mtime'];
if ($p_header['mdate'] && $p_header['mtime']) {
// ----- Extract time
$v_hour = ($p_header['mtime'] & 0xF800) >> 11;
$v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
$v_seconde = ($p_header['mtime'] & 0x001F) * 2;
// ----- Extract date
$v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
$v_month = ($p_header['mdate'] & 0x01E0) >> 5;
$v_day = $p_header['mdate'] & 0x001F;
// ----- Get UNIX date format
$p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
} else {
$p_header['mtime'] = time();
}
// TBC
//for (reset($v_data); $key = key($v_data); next($v_data)) {
//}
// ----- Recuperate date in UNIX format
//if ($p_header['mdate'] && $p_header['mtime'])
// TBC : bug : this was ignoring time with 0/0/0
if (1) {
// ----- Extract time
$v_hour = ($p_header['mtime'] & 0xF800) >> 11;
$v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
$v_seconde = ($p_header['mtime'] & 0x001F) * 2;
// ----- Extract date
$v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
$v_month = ($p_header['mdate'] & 0x01E0) >> 5;
$v_day = $p_header['mdate'] & 0x001F;
// ----- Get UNIX date format
$p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
} else {
$p_header['mtime'] = time();
}
// ----- Set the stored filename
$p_header['stored_filename'] = $p_header['filename'];
// ----- Set default status to ok
if ($p_local_header['compression'] != $p_central_header['compression']) {
}
if ($p_local_header['mtime'] != $p_central_header['mtime']) {
}
if ($p_local_header['filename_len'] != $p_central_header['filename_len']) {
}
// ----- Look for flag bit 3
if (($p_local_header['flag'] & 8) == 8) { 19.05.2022
acquia_dam 1.0.0-rc1 ::
src/StreamWrapper/AcquiaDamStreamWrapper.php
$stat[7] = $stat['size'] = $this->asset['file_properties']['size_in_kbytes'] * 1024;
$stat[8] = $stat['atime'] = strtotime($this->asset['last_update_date']);
$stat[9] = $stat['mtime'] = strtotime($this->asset['last_update_date']);
$stat[10] = $stat['ctime'] = strtotime($this->asset['last_update_date']);
$stat[11] = $stat['blksize'] = 0;
$stat[12] = $stat['blocks'] = 0;
return $stat;
} 19.05.2022
acquia_dam 1.0.0-rc1 ::
tests/src/Kernel/StreamWrapper/AcquiaDamStreamWrapperTest.php
'size' => 312320,
'atime' => 1632436527,
'mtime' => 1632436527,
'ctime' => 1632436527,
'blksize' => 0,
'blocks' => 0,
], $result);
} 03.07.2020
advagg 8.x-4.x-dev ::
src/State/Files.php
* @code * 'filesize' => filesize($file), * 'mtime' => @filemtime($file), * 'filename_hash' => Crypt::hashBase64($file), * 'content_hash' => Crypt::hashBase64($file_contents), * 'linecount' => $linecount, * 'data' => $file, * 'fileext' => $ext, * ...
$data = [
'filesize' => (int) @filesize($file),
'mtime' => @filemtime($file),
'filename_hash' => Crypt::hashBase64($file),
'content_hash' => $content_hash,
'linecount' => $linecount,
'data' => $file,
'fileext' => $ext,
'updated' => REQUEST_TIME, 03.07.2020
advagg 8.x-4.x-dev ::
src/Form/InfoForm.php
elseif ($data = $this->advaggFiles->get($filename)) {
$data['File modification date'] = $this->dateFormatter->format($data['mtime'], 'html_datetime');
$data['Information last update'] = $this->dateFormatter->format($data['updated'], 'html_datetime');
return $data;
}
else {
return "File not found and AdvAgg has no record of it. Confirm spelling of the path.";
} 03.07.2020
advagg 8.x-4.x-dev ::
advagg.api.php
// This changes often; 604800 is 1 week.
if ($data['changes'] > 10 && $data['mtime'] >= REQUEST_TIME - 604800) {
// Modify the group hash so this doesn't end up in a big aggregate.
$data['group_hash'];
}
}
unset($data);
} 17.09.2020
autoupdate 8.x-1.x-dev ::
src/ModuleManager.php
// Get mtime.
$mtime = NULL;
if (isset($module->info['mtime'])) {
$mtime = $module->info['mtime'];
}
// Get composer data.
$install_type = 'manual';
$composer_path = NULL;
$composer_data = $this->getComposerData($name); 27.12.2019
az_blob_fs 8.x-1.x-dev ::
src/StreamWrapper/AzBlobFsStream.php
'size',
'atime',
'mtime',
'ctime',
'blksize',
'blocks',
], 0);
// If $blob_prefixes is not empty and $blobs is, it means it's a directory.
$stat['mode'] = 0100000 | 0777;
$stat['size'] = $blob_properties->getContentLength();
$stat['mtime'] = date_timestamp_get($blob_properties->getLastModified());
$stat['blksize'] = -1;
$stat['blocks'] = -1;
}
if (empty($blob)) {
// Blob is directory. 25.03.2020
azure_blob_fs 8.x-1.0-beta3 ::
src/StreamWrapper/AzureBlobFsStream.php
'size',
'atime',
'mtime',
'ctime',
'blksize',
'blocks'
], 0);
// If our path information is false, we return here.
$stat['mode'] = 0100000 | 0777;
$stat['size'] = $properties->getContentLength();
$stat['mtime'] = date_timestamp_get($properties->getLastModified());
$stat['blksize'] = -1;
$stat['blocks'] = -1;
return $stat;
}
// If we have ourselves a directory, then I have no fucking idea what to do. 28.09.2020
backup_migrate 5.0.0-rc2 ::
src/Core/Service/TarArchiveReader.php
// Change the file mode, mtime.
@touch($header['filename'], $header['mtime']);
if ($header['mode'] & 0111) {
// Make file executable, obey umask.
$mode = fileperms($header['filename']) | (~umask() & 0111);
@chmod($header['filename'], $mode);
}
$header['gid'] = octdec(trim($data['gid']));
$header['size'] = octdec(trim($data['size']));
$header['mtime'] = octdec(trim($data['mtime']));
if (($header['typeflag'] = $data['typeflag']) == "5") {
$header['size'] = 0;
}
$header['link'] = trim($data['link']);
// Look for long filename. 28.09.2020
backup_migrate 5.0.0-rc2 ::
src/Core/Service/TarArchiveWriter.php
$v_gid = sprintf("%6s ", decoct($v_info[5]));
$v_perms = sprintf("%6s ", decoct($v_info['mode']));
$v_mtime = sprintf("%11s", decoct($v_info['mtime']));
$v_linkname = '';
if (@is_link($real_path)) {
$v_typeflag = '2';
$v_linkname = readlink($real_path); 20.10.2020
brandfolder 8.x-1.x-dev ::
src/StreamWrapper/BrandfolderStreamWrapper.php
// Time of last modification (Unix timestamp).
9 => 0,
'mtime' => 0,
// Time of last inode change (Unix timestamp).
10 => 0,
'ctime' => 0,
// Blocksize of filesystem IO.
11 => -1,
'blksize' => -1, 25.02.2020
cloudflare_stream 8.x-1.0 ::
src/StreamWrapper/CloudflareStreamWrapper.php
$stat[7] = $stat['size'] = $size;
$stat['atime'] = 0;
$stat['mtime'] = 0;
$stat['ctime'] = 0;
$stat['blksize'] = 0;
$stat['blocks'] = 0;
return $stat;
} 