These laws were implemented at the Federal, State, and Local levels through the 19th and early 20th Centuries.
It's also a good idea to have a plan of how you will harvest, store, and use your foraged edibles.
When exploring your city for foraging options, remember to always ask permission before harvesting something from private property.