Are you restricting yourself to Statute only? What about rules, regulations made under colour of the same? Standing Orders, Practice Directions, Guidelines, which do not have the force of law but are to be generally followed with deviations rarely accepted?
Laws which are applicable to you? Certainly. Or said another way, in civilized society you’re expected to comport yourself in accordance with all *applicable *law, and you fail to do so at your peril.
But as a practical matter you don’t need to know all the nuances of all areas of law. E.g. there are reams of law & regulation on operating pipelines. If you don’t operate a pipeline you have no need to know those or even know that they exist. There are reams of details on the flavors of homicide. But until you’re contemplating killing somebody, all you really need to know is that killing somebody is illegal and should be avoided.
I started a thread some years ago on the topic of “How long can you go without violating some law inadvertently?” Some folks opined they’d never committed a violation in their lives. More legal-minded folks suggested it was rare for a citizen to get through a single day without some technical violation of something.
This sounds like a question for Randall Munroe (search for “xkcd what if”, if you don’t know what I’m talking about), though it may be a little dry for his taste.
What you are describing is a law library. The world’s largest law library is the Law Library of Congress, which has 2.5 million volumes. Of course, some of that is legal treatises and textbooks, which presumably would not come within your definition of “law.” On the other hand, every law library, even the biggest, is incomplete.
I think it clearly would be doable. Virtually every law, regulation, and ruling on Earth currently exists in written form somewhere on the planet. So the task would just be collecting all these documents together into one place. The result would probably be the largest document collection in history but it would be physically possible to create it.
There would be no practical reason for anyone to “know” all these laws. There’s no place where they’re all applicable.
I wonder how long it would take to collect every law from every city, county, state, country, etc. Every treaty ratified. Every court decision that is still binding (we don’t have to include cases that have been completely overturned by later case law).
We won’t be including the “laws” (bylaws) of private organizations. Just those that are recognized governments. I suppose this would include peoples that are de facto their own government, like the Sentinelise, untouched South American tribes, and the various sovereign nations of Indian Americans in the US (and any other equivalents around the world).
It would be a big job but not an unimaginably big job. Every law and regulation is being handled by public officials. If you had the authority to tell every one of them to send a copy of the laws and regulations they have to a central collection, you’d have a complete set (with a lot of duplication).
Using jbaker’s figure that the Law Library of Congress has 2.5 million volumes. Those are just American laws but we can assume that the United States produces a good share of the world’s written law. So let’s say a complete collection of all the world’s written law would be approximately 250 million volumes.
The largest current library in the world is the British Library in London which had 170 million volumes. So you’d have the biggest collection of documents in the world. But it would be on the same scale as existing collections.