Mon Jun 10
Returning files sorted by creation time.
$files = collect(\File::files($realDirectory))
->filter(function(\SplFileInfo $file) {
return strpos($file->getFileName(), "{$this->fileName}");
})->sortBy(function (\SplFileInfo $file) {
return $file->getCTime();
}, SORT_NUMERIC)->map(function (\SplFileInfo $file) {
return [
'base' => $file->getBasename(),
'name' => $file->getFilename(),
'created' => $file->getCTime(),
'modified' => $file->getMTime(),
'size' => $file->getSize(),
];
});
Fri June 14
Needed to get directories from my dotfiles using yadm as the PHPStorm license was no longer active.
yadm log --all --full-history -- **/thefile.*