onPathParameter

open fun onPathParameter(path: Path, functionName: String, parameterName: String): Path

Invoked each time a path is passed as a parameter to this file system. This returns the path to pass to delegate, which should be path itself or a path on delegate that corresponds to it.

Subclasses may override this to log accesses, fail on unexpected accesses, or map paths across file systems.

The base implementation returns path.

Note that this function will be called twice for calls to atomicMove; once for the source file and once for the target file.

Return

the path to pass to delegate for the same parameter.

Parameters

path

the path passed to any of the functions of this.

functionName

a string like "canonicalize", "metadataOrNull", or "appendingSink".

parameterName

a string like "path", "file", "source", or "target".