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;
    }
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;
    }
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 ; }
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
Return all existing locations for a single file with a timestamp .