From 37acacaa3a13726d54dba91d4ee8e97937463e15 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 27 Jul 2019 12:17:00 -0700 Subject: [PATCH] add rename method to file --- file.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/file.go b/file.go index 86c7e54..2e89b93 100644 --- a/file.go +++ b/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