Trying to download a metadata xml file from a feature layer (not to be confused with a feature service).
I'm having a hard time figuring out how to specify an output directory or path for the downloaded file. Looking at the documentation, it seems to accept a string parameter, but I only get errors when I feed it either an output directory, or a full file path.

If I don't specify anything, it just downloads the xml to a temp folder. Am I doing something wrong?