add rename method to file
This commit is contained in:
parent
b5a39c8c4c
commit
37acacaa3a
5
file.go
5
file.go
@ -27,6 +27,11 @@ type File struct {
|
||||
modTime time.Time
|
||||
}
|
||||
|
||||
// Rename modifies the file path relative to the source directory.
|
||||
func (file *File) Rename(path string) {
|
||||
file.sourcePath = path
|
||||
}
|
||||
|
||||
// Path returns the file path relative to the source directory.
|
||||
func (file *File) Path() string {
|
||||
return file.sourcePath
|
||||
|
Loading…
Reference in New Issue
Block a user