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

fileManager(_:shouldProceedAfterError:movingItemAtPath:toPath:)

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

Declaration 宣言

optional func fileManager(_ fileManager: FileManager, 
  shouldProceedAfterError error: Error, 
         movingItemAtPath srcPath: String, 
                   toPath dstPath: String) -> Bool

Parameters パラメータ

fileManager

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

error

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

srcPath

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

dstPath

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

Return Value 戻り値

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

Discussion 議論

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

This method performs the same task as the fileManager(_:shouldProceedAfterError:movingItemAt:to:) method, which is preferred over this method in macOS 10.6 and later. このメソッドは、macOS 10.6以降ではこのメソッドより好まれるfileManager(_:shouldProceedAfterError:movingItemAt:to:)メソッドと同じ業務を実行します。

See Also 参照

Moving an Item 項目を移動する

Related Documentation 関連文書