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

preferredFilename

The preferred filename for the file wrapper object. ファイルラッパーオブジェクトに対する優先ファイル名。

Declaration 宣言

@property(copy) NSString *preferredFilename;

Discussion 議論

This name is normally used as the dictionary key when a child file wrapper is added to a directory file wrapper. However, if another file wrapper with the same preferred name already exists in the directory file wrapper when this object is added, the filename assigned as the dictionary key may differ from the preferred filename. この名前は、子ファイルラッパーがディレクトリファイルラッパーに加えられる場合に、普通は辞書キーとして使われます。しかしながら、別のファイルラッパーが同じ優先名で既にディレクトリファイルラッパー中にこのオブジェクトが追加される時に存在するならば、辞書キーとして割り当てられるファイル名は優先名と異なるかもしれません。

When you change the preferred filename, the default implementation of this property causes the existing parent directory file wrappers to remove and re-add the child to accommodate the change. Preferred filenames of children are not preserved when you write a file wrapper to disk and then later instantiate another file wrapper by reading the file from disk. If you need to preserve the user-visible names of attachments, you have to store the names yourself. あなたが優先ファイル名を変更する場合、このプロパティの初期状態の実装は、既存の親ディレクトリファイルラッパーを除去して子を再追加することでその変更に順応します。子らの優先ファイル名は、あなたがあるファイルラッパーをディスクに書き出して、それから後でそのファイルをディスクから読み出すことによって別のファイルラッパーをインスタンス化する場合に、保全されません。あなたが添付書類のユーザが見ることができる名前を保全する必要があるならば、あなたはその名前をあなた自身で貯蔵しなければなりません。

See Also 参照

Accessing Files ファイルにアクセスする

Related Documentation 関連文書