Instance Method インスタンスメソッド

fileManager:shouldProceedAfterError:movingItemAtURL:toURL:

Asks the delegate if the move operation should continue after an error occurs while moving the item at the specified URL. 指定されたURLで項目を移動している間にエラーが発生する後で、移動操作は続行するべきか、委任先に尋ねます。

Declaration 宣言

- (BOOL)fileManager:(NSFileManager *)fileManager 
shouldProceedAfterError:(NSError *)error 
    movingItemAtURL:(NSURL *)srcURL 
              toURL:(NSURL *)dstURL;

Parameters パラメータ

fileManager

The file manager object that attempted to move the item. 項目の移動を試みたファイルマネージャオブジェクト。

error

The error that occurred while trying to move the item in srcURL. srcURLの中の項目を移動しようとする間に発生したエラー。

srcURL

The URL of the file or directory that the file manager tried to move. ファイルマネージャが移動しようとしたファイルまたはディレクトリのURL。

dstURL

The URL of the intended destination for the item in srcURL. srcURLの中の項目に対する意図される行き先のURL。

Return Value 戻り値

YES if the operation should proceed or NO if it should be aborted. If you do not implement this method, the file manager assumes a response of NO. 操作が続行すべきならばYESまたはそれが中止されるべきならばNO。あなたがこのメソッドを実装しないならば、ファイルマネージャは応答はNOだと決めてかかります。

Discussion 議論

The file manager calls this method when there is a problem moving the item to the specified location. If you return YES, the file manager proceeds to remove the item from its current location as if the move operation had completed successfully. ファイルマネージャは、指定された場所に対して項目を移動することに問題がある場合に、このメソッドを呼び出します。あなたがYESを返すならば、ファイルマネージャは項目のそれの現在の場所からの除去を続行します、あたかも移動操作が上手く完了したかのように。

This method performs the same task as the fileManager:shouldProceedAfterError:movingItemAtPath:toPath: method and is preferred over that method in macOS 10.6 and later. このメソッドは、fileManager:shouldProceedAfterError:movingItemAtPath:toPath:メソッドと同じ業務を実行して、そのメソッドより、macOS 10.6以降では好まれます。

See Also 参照

Moving an Item

Related Documentation 関連文書