You must try to locate the true owner and take care of it until returned to its owner or prior possessor. You must return it to the owner (if/when found) immediately.
You may be allowed to claim possession when it will become an unclaimed property, which is eventually deemed abandoned property where the apparent owner has not claimed the property. Depending on the category of property, the recovery must be within as little as one year and as long as fifteen years. General personal property becomes abandoned five years after the date on which the owner’s right to recover the property arises.
You should not look at its content and leave an appointed person to do it.
As you found it in a Library you should return to an employee. If you want to be able to claim possession of it if the owner won't be find, you should ask him to take your name and contact details explaining the reason. However the library could be second (after the owner) in the line to claim it.