I want to write a method that does this

```
def search_for_filenames(dir, name)
    # goes to the directory and returns a list of files that match
    # the given name, regardless of extension
end

```

So for example if the name was `test`, and my directory contained the following

```
test.png
test.txt
something_else.dat

```

The method will return an array containing the first two filenames

How can I write this method?