Skip to main content

Module location

Module location 

Source
Expand description

位置工具

对应 TypeScript 版本的 util/location.ts

Functions§

get_current_dir
获取当前工作目录
get_dist_path
获取编译后的文件路径(dist 目录)
get_executable_dir
获取当前可执行文件的目录
get_extension
获取文件扩展名
get_filename
获取文件名(含扩展名)
get_project_root
获取项目根目录(查找 Cargo.toml 或 package.json)
get_stem
获取文件名(不含扩展名)
is_dir
检查是否是目录
is_file
检查是否是文件
join_path
连接路径
normalize_path
规范化路径
path_exists
检查路径是否存在
relative_path
获取相对路径