If you go with my suggestion to change the API below, you might as well just pass in the full file name here and parse that to figure out the directory, received and from to pass to the constructor