Drupal Association members fund grants that make connections all over the world.
The doxygen for file_scan_directory is wrong and has been wrong for many versions of Drupal.
The docs state about the $key argument:
'key' The key to be used for the returned array of files. Possible values are 'filepath', for the path starting with $dir, 'filename', for the basename of the file, and 'name' for the name of the file without an extension. Defaults to 'filepath'.
'filepath' is not a valid value for this option, it should be 'uri', though I'm not entirely sure what that means in terms of a return value, so I'm not sure what its description should change to!