Copy folder to a temp directory in Mac OS

I can see the below script on Mac fixlets and curious if I can just change the “posix path of file” to “posix path of folder” to move a folder? If not, then what is the correct action script to move a folder?

wait cp “{posix path of file “ApplicationName.pkg” of folder “__Download” of client folder of current site}” “/private/tmp/ApplicationName.pkg”

wait cp “{posix path of folder “FolderName” of folder “__Download” of client folder of current site}” “/private/tmp/FolderName”

For this example, I’d recommend instead using the actionscript copy or move command.

copy "__Download/the.file" "/tmp/the.file"

I see, so the usual copy and move command should be fine. I wonder why the HCL provided fixlets for Mac uses the wait cp posix path of file command.

posix path is unique to macOS, so this method probably dates from a time when macOS was less graceful about file pathing for different API methods.

It could be from a template that was laid down before other methods were available. Sometimes we see stuff like that that is maintained for reasons of backward compatibility.