if the file being received already exists locally, it will be renamed
This commit is contained in:
16
internal/transfer/writer.go
Normal file
16
internal/transfer/writer.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package transfer
|
||||
|
||||
import "io"
|
||||
|
||||
type Writer struct {
|
||||
w io.Writer
|
||||
filePath string
|
||||
}
|
||||
|
||||
func (w Writer) Write(p []byte) (n int, err error) {
|
||||
return w.w.Write(p)
|
||||
}
|
||||
|
||||
func (w Writer) GetFilePath() string {
|
||||
return w.filePath
|
||||
}
|
||||
Reference in New Issue
Block a user