Files
michaelschiemer/tests/debug/test-list-directory.php
Michael Schiemer fc3d7e6357 feat(Production): Complete production deployment infrastructure
- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
2025-10-25 19:18:37 +02:00

60 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/../../vendor/autoload.php';
use App\Framework\Filesystem\FileStorage;
// Create temp directory
$testDir = sys_get_temp_dir() . '/list_test_' . uniqid();
mkdir($testDir, 0777, true);
echo "Test directory: $testDir\n";
// Create FileStorage
$storage = new FileStorage(basePath: $testDir);
// Create some files
$storage->put('listable/file1.txt', 'content1');
$storage->put('listable/file2.txt', 'content2');
$storage->put('listable/file3.txt', 'content3');
echo "\nFiles created\n";
// List directory
$contents = $storage->listDirectory('listable');
echo "\nDirectory contents:\n";
echo "Type: " . gettype($contents) . "\n";
echo "Count: " . count($contents) . "\n";
echo "Contents: " . print_r($contents, true) . "\n";
echo "\nArray values:\n";
print_r(array_values($contents));
// Cleanup
function deleteDirectoryRecursive(string $dir): void
{
if (!is_dir($dir)) {
return;
}
$files = array_diff(scandir($dir), ['.', '..']);
foreach ($files as $file) {
$path = $dir . '/' . $file;
if (is_dir($path)) {
deleteDirectoryRecursive($path);
} else {
unlink($path);
}
}
rmdir($dir);
}
deleteDirectoryRecursive($testDir);
echo "\nCleanup done\n";