2020-11-19 13:53:22 +00:00
|
|
|
package meta
|
|
|
|
|
2020-12-08 07:51:34 +00:00
|
|
|
import (
|
2021-06-28 14:01:31 +00:00
|
|
|
"io/fs"
|
2020-12-08 07:51:34 +00:00
|
|
|
)
|
|
|
|
|
2020-11-19 13:53:22 +00:00
|
|
|
// Info groups the information about DB.
|
|
|
|
type Info struct {
|
|
|
|
// Full path to the metabase.
|
|
|
|
Path string
|
2020-12-08 07:51:34 +00:00
|
|
|
|
|
|
|
// Permission of database file.
|
2021-06-28 14:01:31 +00:00
|
|
|
Permission fs.FileMode
|
2020-11-19 13:53:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DumpInfo returns information about the DB.
|
|
|
|
func (db *DB) DumpInfo() Info {
|
2022-11-15 12:46:32 +00:00
|
|
|
db.modeMtx.RLock()
|
|
|
|
defer db.modeMtx.RUnlock()
|
|
|
|
|
2020-11-19 13:53:22 +00:00
|
|
|
return db.info
|
|
|
|
}
|