Instance Property インスタンスプロパティ

presentedItemURL

The URL of the presented file or directory. 提示されたファイルまたはディレクトリのURL。

Declaration 宣言

var presentedItemURL: URL? { get }

Discussion 議論

File presenters must implement this property and use it to return the file or directory of interest. If this object presents a group of related files that all reside in the same directory, specify the URL of the directory instead of creating separate presenter objects for each file. For example, a single-window application that manages multiple files inside a project directory should monitor the project directory. ファイルプレゼンタはこのプロパティを実装しなければなりません、そしてそれを使って興味のあるファイルまたはディレクトリを返します。全て同じディレクトリの中に存在する関連ファイルの1グループをこのオブジェクトが提示するならば、各ファイルに対して別個のプレゼンタオブジェクトを作成する代わりにディレクトリのURLを指定してください。例えば、あるプロジェクトディレクトリ内の複数のファイルを管理する単一ウインドウアプリケーションは、そのプロジェクトディレクトリを監視すべきです。

The URL associated with your item may be requested by objects not associated with your presenter. Therefore, your implementation of the accessor method for this property must be thread safe and capable of running in multiple dispatch or operation queues simultaneously. あなたの項目と結びつけられるURLは、あなたのプレゼンタと結びつけられないオブジェクトによって要請されるかもしれません。したがって、このプロパティのためのアクセッサメソッドのあなたの実装は、スレッド安全である、そして複数のディスパッチまたは演算キューにおいて同時に動作することが可能である必要があります。

See Also 参照

Accessing File Presenter Attributes ファイルプレゼンタ属性にアクセスする