1 && $path[1] === ':'); } /** * Normalize path (remove double slashes, etc.) */ public static function normalizePath(string $path): string { return realpath($path) ?: $path; } /** * Get file extension */ public static function getFileExtension(string $path): string { return pathinfo($path, PATHINFO_EXTENSION); } /** * Get file name without extension */ public static function getFileNameWithoutExtension(string $path): string { return pathinfo($path, PATHINFO_FILENAME); } /** * Get file name with extension */ public static function getFileName(string $path): string { return pathinfo($path, PATHINFO_BASENAME); } /** * Get directory name */ public static function getDirectoryName(string $path): string { return pathinfo($path, PATHINFO_DIRNAME); } /** * Debug: Print all paths */ public static function debugPaths(): void { self::initialize(); echo "🔍 PathManager Debug Information:\n"; echo "================================\n"; echo "Root Path: " . self::$rootPath . "\n"; echo "App Path: " . self::$appPath . "\n"; echo "Modules Path: " . self::$modulesPath . "\n"; echo "Storage Path: " . self::$storagePath . "\n"; echo "Public Path: " . self::$publicPath . "\n"; echo "Vendor Path: " . self::$vendorPath . "\n"; echo "Config Path: " . self::$configPath . "\n"; echo "Docs Path: " . self::$docsPath . "\n"; echo "Tools Path: " . self::$toolsPath . "\n"; echo "Bin Path: " . self::$binPath . "\n"; echo "Src Path: " . self::getSrcPath() . "\n"; echo "Projects Path: " . self::getProjectsPath() . "\n"; echo "Template Path: " . self::getTemplatePath() . "\n"; echo "Tests Path: " . self::getTestsPath() . "\n"; echo "Venv Path: " . self::getVenvPath() . "\n"; echo "\n"; echo "📁 Available Modules:\n"; $modules = self::getModuleNames(); foreach ($modules as $module) { echo " - $module\n"; } echo "\n"; echo "📄 Migration Files Found: " . count(self::getAllMigrationFiles()) . "\n"; } }