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

fileManager(_:shouldProceedAfterError:linkingItemAtPath:toPath:)

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

Declaration 宣言

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

Parameters パラメータ

fileManager

The file manager object that attempted to create the link. リンクの作成を試みたファイルマネージャオブジェクト。

error

The error that occurred during the link attempt. リンクの試みの間に発生したエラー。

srcPath

The path to the attempted link location. 試みられたリンク位置へのパス。

dstPath

The path to the file or directory that was the destination of the hard link. ハードリンクの行き先だったファイルまたはディレクトリのパス。

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 creating a hard link to the item at the specified location. If you return true, the file manager continues creating any other links associated with the current operation and ignores the error. ファイルマネージャは、指定された場所での項目へのハードリンクを作成することに問題がある場合に、このメソッドを呼び出します。あなたがtrueを返すならば、ファイルマネージャは現在の操作と結び付けられた何らかの他のリンクを作成することを継続します、そしてエラーを無視します。

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

See Also 参照

Linking an Item 項目をリンクする

Related Documentation 関連文書