add rename method to file

This commit is contained in:
Alex Yatskov 2019-07-27 12:17:00 -07:00
parent b5a39c8c4c
commit 37acacaa3a

View File

@ -27,6 +27,11 @@ type File struct {
modTime time.Time 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. // Path returns the file path relative to the source directory.
func (file *File) Path() string { func (file *File) Path() string {
return file.sourcePath return file.sourcePath