Pergunta

The method -isFileReferenceURL is define on NSURL class but I can't figure out what this method is. I thought this determines whether the URL points actual file or not, but it isn't. It returns NO even when the file exist. The manual says just

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 file reference URL? When does this method returns YES?

Foi útil?

Solução

A file reference URL is a special URL that refers directly to a file, rather than to "whatever file is at 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 reference URL by calling the -fileReferenceURL method on any regular file URL.

Outras dicas

Try using isFileURL. There's a difference between a "File Reference URL" and a "URL that points at a File". ;)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top