魔法文件名

版本新特性 / Swift 5.8

// *** 在 5.8 版本中 ***
print(#file)

// *** 以前 ***
print(#filePath)


#file evaluates to a string literal containing the full path to the current source file.