Extracts a unique identity string from the base name of file.
If the base name of file is missing a '.source' extension, the function sets throws and
returns null.
| file |
a File for a data source |
|
the unique identity string for |