Access to part of the code


I would like to know if there is any way I can restrict the access for some developers to work on only some files or parts of the code. Specifically I need to add new external developers to a team and I would like to protect our software to let me download a complete copy. Maybe not as an specific GitLab functionality but a suggested method to organize the files or modules.

Thank you.