public static function getBundleFileDetails(&$bundle, string &$file)
    {
        $filePath = $bundle->directory . $file;
        $fileModified = filemtime($bundle->directory . $file);
        
        if (!$bundle->lastModified || $fileModified > $bundle->lastModified) {
            $bundle->lastModified = $fileModified;
        }
        
        $preloaded = new \stdClass();
        $preloaded->modified = $fileModified;
        $preloaded->path = $filePath;
        $preloaded->name = basename($file);
        $preloaded->directory = dirname($filePath);
        
        return $preloaded;
    }