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
  • 58,317
  • 11
  • 87
  • 139
user1079052
  • 3,803
  • 4
  • 30
  • 55

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
  • 1,009
  • 1
  • 13
  • 16