<?php
$args = "<args></args> "; // write a path here without a / at the end
$targetModpack = "<modpack></modpack> "; // the target modpack
$yourPath = "<path></path> <br>"; // the target HTTP folder for download

$expectedFiles = ['.', '..', 'test']; // the expected folder, DON'T REMOVE THE EXISTING ITEM IN
$dir = ''; // the repertory in local for PHP can check the file

echo $args;
echo $targetModpack;
echo $yourPath;

clearstatcache();
if (substr($dir, -1) != '/') { $dir .= '/'; }
$scan = scandir($dir);

foreach ($scan as $file)
{
		if (!in_array($file, $expectedFiles))
		{
				echo '<name>'.$file.'</name><br>';
				echo '<size>'.filesize($dir.$file).'</size><br>';
				echo '<date>'.date('Y-n-d-G-i', filemtime($dir.$file)).'</date><br>';
		}
}
