Check for file in repository


i’m trying to develop a feature for Gitlab. So far i followed the guide and it worked well.
I created my route and controller. I can retrieve projects and list them in the view. Great! :slight_smile:

But now i want to check if a certain file exists in each of these projects
I have this here, but it seems to check for file contents:, 'master').find('/composer.json')

How do i check if a file exists within a repository?


ochorocho _files('master').include? "composer.json"

Does the job. :slight_smile:

1 Like