Distinguish between active versions and old versions to put old ones in the list of objects and treat their attributes.

in a folder I need to know if a document that belongs to a $ doc list is an active (last) version or is a read-only version. I can not find examples of the metadata Version, OldVersion. VersionSequence, OrigalNumber, StateId, status, DocumentID.

Thank you