What feature is [NSURL isFileReferenceURL]?

The -isFileReferenceURL method -isFileReferenceURL defined in the NSURL class, but I can’t understand what this method is. I thought this determines whether the URL indicates the actual file or not, but that is not the case. It returns NO even if the file exists. The manual says that

 isFileReferenceURL Returns whether the URL is a file reference URL. - (BOOL)isFileReferenceURL Return Value YES if the URL is a file reference URL; otherwise, NO. Availability Available in iOS 5.0 and later. (Symbol is present in iOS 4, but performs no operation.) Declared In NSURL.h 

What is this method? What is the URL of the file link? When does this method return YES ?

+6
source share
2 answers

A file link URL is a special URL that refers directly to a file, and not to "any file on this path." This allows it to still point to the file if the user moves it, for example, which is very useful. You can create a file link URL by calling the -fileReferenceURL method on any regular file URL.

+18
source

Try using isFileURL . There is a difference between “File Link URL” and “File URL” .;)

-5
source

All Articles