NewFile 创建文件对象 abs: 文件绝对路径 rel: 文件相对路径(相对于项目根目录)
(abs, rel string)
| 17 | // abs: 文件绝对路径 |
| 18 | // rel: 文件相对路径(相对于项目根目录) |
| 19 | func NewFile(abs, rel string) *File { |
| 20 | return &File{ |
| 21 | abspath: abs, |
| 22 | relpath: rel, |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | // Abspath 文件绝对路径 |
| 27 | func (file *File) Abspath() string { |
no outgoing calls
no test coverage detected