Check timestamps for files
This commit is contained in:
parent
4246e7602f
commit
3325fa07ea
8 changed files with 229 additions and 17 deletions
|
@ -344,6 +344,10 @@ func (r *SFTP) filename(t Type, id ID) string {
|
|||
// Get returns the content stored under the given ID. If the data doesn't match
|
||||
// the requested ID, ErrWrongData is returned.
|
||||
func (r *SFTP) Get(t Type, id ID) ([]byte, error) {
|
||||
if id == nil {
|
||||
return nil, errors.New("unable to load nil ID")
|
||||
}
|
||||
|
||||
// try to open file
|
||||
file, err := r.c.Open(r.filename(t, id))
|
||||
defer file.Close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue