If you have access to the folder (because you have the folder key, XYZ789 ), then you can open any file inside without ever seeing the individual file key . To the user, it looks like they opened a file without a key.
Are you trying to recover or access a shared link from someone else? How do encrypted file and folder links work? How To Open A Mega Link Without Decryption Key