filePath()
Produces the complete path to the file in which the macro appears.
Declaration
@freestanding(expression) macro filePath<T>() -> T where T : ExpressibleByStringLiteralOverview
Because #fileID doesn’t embed the full path to the source file, unlike #filePath, it gives you better privacy and reduces the size of the compiled binary. Avoid using #filePath outside of tests, build scripts, or other code that doesn’t become part of the shipping program.
This macro’s value can be changed by #sourceLocation, as described in Line Control Statement in The Swift Programming Language.