Example #1
0
func (f *RemoteFileSystem) RemoteWrite(req *WriteRequest, res *RemoteResponse) error {
	fsys := fs.StdFileSystem{}
	res.Error = fsys.Write(req.File, req.Data, req.Perm)
	if res.Error == nil {
		res.Success = true
	}
	log.Printf("Writing to file on remote side: %s @ %s. Error? %v\n", req.File.Name(), req.File.Path())
	return res.Error
}