original_string: public function locateFile(array $paths, $name, $ext = '.yaml')
      {
          $filename = preg_replace('|[.\/]+|', '/', $name) . $ext;
  
          $list = [];
          foreach ($paths as $folder) {
              $path = trim(Folder::getRelativePath($folder), '/');
  
              if (is_file("{$folder}/{$filename}")) {
                  $modified = filemtime("{$folder}/{$filename}");
              } else {
                  $modified = 0;
              }
              $basename = $this->base . $name;
              $list[$path] = [$basename => ['file' => "{$path}/{$filename}", 'modified' => $modified]];
          }
  
          return $list;
      }
code: public function locateFile(array $paths, $name, $ext = '.yaml')
      {
          $filename = preg_replace('|[.\/]+|', '/', $name) . $ext;
  
          $list = [];
          foreach ($paths as $folder) {
              $path = trim(Folder::getRelativePath($folder), '/');
  
              if (is_file("{$folder}/{$filename}")) {
                  $modified = filemtime("{$folder}/{$filename}");
              } else {
                  $modified = 0;
              }
              $basename = $this->base . $name;
              $list[$path] = [$basename => ['file' => "{$path}/{$filename}", 'modified' => $modified]];
          }
  
          return $list;
      }
code_tokens: public function locateFile ( array $ paths , $ name , $ ext = '.yaml' ) { $ filename = preg_replace ( '|[.\/]+|' , '/' , $ name ) . $ ext ; $ list = [ ] ; foreach ( $ paths as $ folder ) { $ path = trim ( Folder :: getRelativePath ( $ folder ) , '/' ) ; if ( is_file ( "{$folder}/{$filename}" ) ) { $ modified = filemtime ( "{$folder}/{$filename}" ) ; } else { $ modified = 0 ; } $ basename = $ this -> base . $ name ; $ list [ $ path ] = [ $ basename => [ 'file' => "{$path}/{$filename}" , 'modified' => $ modified ] ] ; } return $ list ; }
docstring: Return all existing locations for a single file with a timestamp.
  
  @param  array  $paths   Filesystem paths to look up from.
  @param  string $name    Configuration file to be located.
  @param  string $ext     File extension (optional, defaults to .yaml).
  @return array
docstring_tokens: Return all existing locations for a single file with a timestamp .