In Finder on macOS, hold the Option (Alt) key and right click a file to see the option 'Copy "filename" as Pathname'. Clicking this will copy the full path to the file to the clipboard.