Eon*_*nil 7 nsurl file-reference-url
该方法-isFileReferenceURL是在NSURL类上定义的,但我无法弄清楚这个方法是什么.我认为这决定了URL是否指向实际文件,但事实并非如此.NO即使文件存在,它也会返回.手册说的只是
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
Run Code Online (Sandbox Code Playgroud)
这个方法是什么?什么是文件引用URL?这个方法何时返回YES?
Cat*_*Man 20
文件引用URL是直接引用文件的特殊URL,而不是"此路径上的任何文件".例如,这允许它在用户移动文件时仍指向文件,这非常有用.您可以通过-fileReferenceURL在任何常规文件URL上调用方法来创建文件引用URL.