For a function to find a file, it looks for the full path name of the file if given (should always work) or in the current working directory as shown by getwd()
. Otherwise, a relative directory identifier can be given. See here for a simple way to make easier.