()
| 515 | } |
| 516 | |
| 517 | func (file *File) GetPath() string { |
| 518 | // 统一添加路径前缀 |
| 519 | if file.Path != "" && !strings.HasPrefix(file.Path, "/") { |
| 520 | return "/" + file.Path |
| 521 | } |
| 522 | return file.Path |
| 523 | } |
| 524 | |
| 525 | // NormalizePath 将文件路径规范化为带前导斜杠的形式。 |
| 526 | func (file *File) NormalizePath() { |
no outgoing calls
no test coverage detected