Whether you can do this at all depends on your operating system and the functionality it provides. Of all the operating systems I'm familiar with, none provide this functionality: all of them permit anything that can be read to be copied, since a user can just read the contents with a program and then write them to a different file. So I'm not aware of anyone who can implement this as an effective control on a reasonable modern operating system.
Most companies who are concerned about source code loss implement reasonable security policies for code (e.g., requiring laptops to be encrypted or restricting source code to development VMs inside the corporate network) as well as legal agreements with employees and staff to require them to not reveal code or secrets. Usually these measures are sufficient, since practically, you have to trust your developers at least somewhat. You are trusting them to write good quality code, to not insert backdoors, and to follow the company's standards for code and development practices.