mirror of
https://github.com/jhillyerd/inbucket.git
synced 2026-01-08 12:11:55 +00:00
More basic POP3 implementation
Filestore/Datastore now supports a Size() method.
This commit is contained in:
@@ -217,6 +217,14 @@ func (m *FileMessage) String() string {
|
||||
return fmt.Sprintf("\"%v\" from %v", m.Fsubject, m.Ffrom)
|
||||
}
|
||||
|
||||
func (m *FileMessage) Size() int64 {
|
||||
fi, err := os.Stat(m.rawPath())
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return fi.Size()
|
||||
}
|
||||
|
||||
func (m *FileMessage) gobPath() string {
|
||||
return filepath.Join(m.mailbox.path, m.Fid+".gob")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user