Search code examples
macosfilesystemsfinder

Native framework for copying file on macOS


Is there a framework in macOS that I can use to programmatically copy files and get a progress bar the same as copying files from Finder? copy progress

Alternatively, I can do the copy using cp or filesystem APIs and use NSProgressIndicator to implement the progress bar.


Solution

  • You can use copyFile.
    Here is example of copyfile with Progress Callback.