import.meta.dirname


  • <string> 当前模块的目录名。

    ¥<string> The directory name of the current module.

这与 import.meta.filenamepath.dirname() 相同。

¥This is the same as the path.dirname() of the import.meta.filename.

警告:仅存在于 file: 模块上。

¥Caveat: only present on file: modules.