1

I am moving a file within my project and I get: Error Domain=NSCocoaErrorDomain Code=514 "The operation couldn’t be completed. (Cocoa error 514.)"

[[NSFileManager defaultManager] moveItemAtURL:oldLocation
                                                toURL:[NSURL fileURLWithPath:newLocation]
                                                error:&error]

The locations I am using are valid and what is causing the error is when the file name is over 100 characters. Is there a unwritten rule about file name length?

pnuts
  • 56,678
  • 9
  • 81
  • 133
user1079052
  • 3,655
  • 4
  • 25
  • 50

1 Answers1

0

There is a limit for file names and file paths.

You can check out my answer to this question here:

Custom URL Scheme maximum URL length

Community
  • 1
  • 1
yvanscher
  • 979
  • 11
  • 16