In order to read _current_ HFS data from a mounted disk we need to
flush the HFS cache to disk before we start to read.
You're not permitted to do this; while the volume is mounted the HFS filesystem
instance is the sole owner of that range of disk blocks.
You cannot legally read or write these blocks; the filesystem is under no
obligation to ensure that the physical device contains data meaningful to
you, and it (rightfully) expects that data on disk remains as it was written.
I need to get a list of all files with related information.
This must be obtained via the standard system call interfaces; the system
knows far more about the state of the filesystem than you do, and it presents
this information to you in a standardised format.
As others have noted, there are efficient, legal, authenticated interfaces
for obtaining this information. You should use one.