Type Method 型メソッド

bookmarkDataWithContentsOfURL:error:

Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. 指定されたURLによって指し示されるエイリアスファイルから引き出されるブックマークデータを初期化して返します。

Declaration 宣言

+ (NSData *)bookmarkDataWithContentsOfURL:(NSURL *)bookmarkFileURL 
                                    error:(NSError * _Nullable *)error;

Parameters パラメータ

bookmarkFileURL

The URL that points to a file containing bookmark data. ブックマークデータを含んでいるファイルを指し示すURL。

error

The error that occurred in the case that the bookmark data cannot be derived. ブックマークデータが引き出されることができないという事情で発生したエラー。

Return Value 戻り値

The bookmark data for the alias file. エイリアスファイルに対するブックマークデータ。

Discussion 議論

This method doesn’t check to see if bookmarkFileURL points to an alias file. This allows this method to work with any file containing bookmark data. If bookmarkFileURL refers to a file which does not contain bookmark data or to a non-file object, such as a directory or symbolic link, this method returns nil produces an error. このメソッドは、bookmarkFileURLがエイリアスファイルを指し示すかを見るために検査しません。これは、このメソッドがブックマークデータを含んでいるあらゆるファイルで働くことを可能にします。bookmarkFileURLがブックマークデータを含まないファイルを参照する、またはファイルでないオブジェクト、例えばディレクトリやシンボリックリンクを参照するならば、このメソッドはエラーを生成するnilを返します。

This method returns nil if bookmark data cannot be created. このメソッドは、ブックマークデータが作成されることができないならばnilを返します。

See Also 参照

Working with Bookmark Data ブックマークデータを扱う